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

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