Trait postgres::tls::MakeTlsConnect
source · [−]pub trait MakeTlsConnect<S> {
type Stream: TlsStream + Unpin;
type TlsConnect: TlsConnect<S>
where
<Self::TlsConnect as TlsConnect<S>>::Stream == Self::Stream;
type Error: Into<Box<dyn Error + Send + Sync + 'static, Global>>;
fn make_tls_connect(
&mut self,
domain: &str
) -> Result<Self::TlsConnect, Self::Error>;
}
Expand description
A constructor of TlsConnect
ors.
Requires the runtime
Cargo feature (enabled by default).
Required Associated Types
type TlsConnect: TlsConnect<S>
where
<Self::TlsConnect as TlsConnect<S>>::Stream == Self::Stream
type TlsConnect: TlsConnect<S>
where
<Self::TlsConnect as TlsConnect<S>>::Stream == Self::Stream
The TlsConnect
implementation created by this type.
Required Methods
fn 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 TlsConnect
or.
The domain name is provided for certificate verification and SNI.