Trait postgres::tls::TlsHandshake
[−]
[src]
pub trait TlsHandshake: Debug { fn tls_handshake(
&self,
host: &str,
stream: Stream
) -> Result<Box<TlsStream>, Box<Error + Sync + Send>>; }
A trait implemented by types that can initiate a TLS session over a Postgres stream.
Required Methods
fn tls_handshake(
&self,
host: &str,
stream: Stream
) -> Result<Box<TlsStream>, Box<Error + Sync + Send>>
&self,
host: &str,
stream: Stream
) -> Result<Box<TlsStream>, Box<Error + Sync + Send>>
Performs a client-side TLS handshake, returning a wrapper around the provided stream.
The host portion of the connection parameters is provided for hostname verification.
Implementors
impl<T: TlsHandshake + ?Sized> TlsHandshake for Box<T>