pub trait MakeTlsConnect<S> {
type Stream: TlsStream + Unpin;
type TlsConnect: TlsConnect<S, Stream = Self::Stream>;
type Error: Into<Box<dyn Error + Send + Sync>>;
// Required method
fn make_tls_connect(
&mut self,
domain: &str,
) -> Result<Self::TlsConnect, Self::Error>;
}Expand description
A constructor of TlsConnectors.
Requires the runtime Cargo feature (enabled by default).
Required Associated Types§
Sourcetype TlsConnect: TlsConnect<S, Stream = Self::Stream>
type TlsConnect: TlsConnect<S, Stream = Self::Stream>
The TlsConnect implementation created by this type.
Required Methods§
Sourcefn make_tls_connect(
&mut self,
domain: &str,
) -> Result<Self::TlsConnect, Self::Error>
fn make_tls_connect( &mut self, domain: &str, ) -> Result<Self::TlsConnect, Self::Error>
Creates a new TlsConnector.
The domain name is provided for certificate verification and SNI.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl<S> MakeTlsConnect<S> for NoTls
Available on crate feature runtime only.
impl<S> MakeTlsConnect<S> for NoTls
Available on crate feature
runtime only.