Trait tor_rtcompat::TlsProvider
source · [−]pub trait TlsProvider<S> {
type Connector: TlsConnector<S, Conn = Self::TlsStream> + Send + Sync + Unpin;
type TlsStream: AsyncRead + AsyncWrite + CertifiedConn + Unpin + Send + 'static;
fn tls_connector(&self) -> Self::Connector;
}
Expand description
Trait for a runtime that knows how to create TLS connections over
TCP streams of type S
.
This is separate from TlsConnector
because eventually we may
eventually want to support multiple TlsConnector
implementations
that use a single Runtime
.
See the TlsConnector
documentation for a discussion of the Tor-specific
limitations of this trait: If you are implementing something other than Tor,
this is not the functionality you want.
Required Associated Types
The Connector object that this provider can return.
type TlsStream: AsyncRead + AsyncWrite + CertifiedConn + Unpin + Send + 'static
type TlsStream: AsyncRead + AsyncWrite + CertifiedConn + Unpin + Send + 'static
The type of the stream returned by that connector.
Required Methods
fn tls_connector(&self) -> Self::Connector
fn tls_connector(&self) -> Self::Connector
Return a TLS connector for use with this runtime.