pub(crate) struct BuiltinTransports {
key_pair: KeyPair,
crypto_provider: Option<CryptoProviderRef>,
quic_runtime: Option<QuicRuntimeRef>,
}Expand description
Dials and listens with the built-in TCP, TLS and QUIC.
Fields§
§key_pair: KeyPairSigns the TLS and QUIC certificates.
crypto_provider: Option<CryptoProviderRef>The rustls crypto (see Config::crypto_provider).
quic_runtime: Option<QuicRuntimeRef>Runs the built-in QUIC (see Config::quic_runtime).
Implementations§
Source§impl BuiltinTransports
impl BuiltinTransports
pub(crate) fn new(key_pair: &KeyPair, config: &Config) -> Self
Sourcepub(crate) async fn dial(
&self,
endpoint: &Endpoint,
peer_id: &Option<PeerID>,
) -> Result<DialResult>
pub(crate) async fn dial( &self, endpoint: &Endpoint, peer_id: &Option<PeerID>, ) -> Result<DialResult>
Dials a TCP or TLS endpoint.
Sourcepub(crate) async fn dial_quic(
&self,
endpoint: &Endpoint,
peer_id: &Option<PeerID>,
ex: &Executor,
) -> Result<DialResult>
pub(crate) async fn dial_quic( &self, endpoint: &Endpoint, peer_id: &Option<PeerID>, ex: &Executor, ) -> Result<DialResult>
Dials a QUIC endpoint and opens the first stream, for the handshake.
Sourcepub(crate) async fn listen(&self, endpoint: &Endpoint) -> Result<StreamListener>
pub(crate) async fn listen(&self, endpoint: &Endpoint) -> Result<StreamListener>
Listens on a TCP or TLS endpoint.
Sourcepub(crate) fn quic_server_config(
&self,
ex: &Executor,
) -> Result<ServerQuicConfig>
pub(crate) fn quic_server_config( &self, ex: &Executor, ) -> Result<ServerQuicConfig>
The config of a built-in QUIC listener.
Auto Trait Implementations§
impl !RefUnwindSafe for BuiltinTransports
impl !UnwindSafe for BuiltinTransports
impl Freeze for BuiltinTransports
impl Send for BuiltinTransports
impl Sync for BuiltinTransports
impl Unpin for BuiltinTransports
impl UnsafeUnpin for BuiltinTransports
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more