[][src]Trait tokio_postgres::tls::TlsConnect

pub trait TlsConnect<S> {
    type Stream: AsyncRead + AsyncWrite;
    type Error: Into<Box<dyn Error + Sync + Send>>;
    type Future: Future<Item = (Self::Stream, ChannelBinding), Error = Self::Error>;
    fn connect(self, stream: S) -> Self::Future;
}

An asynchronous function wrapping a stream in a TLS session.

Associated Types

type Stream: AsyncRead + AsyncWrite

The stream returned by the future.

type Error: Into<Box<dyn Error + Sync + Send>>

The error type returned by the future.

type Future: Future<Item = (Self::Stream, ChannelBinding), Error = Self::Error>

The future returned by the connector.

Loading content...

Required methods

fn connect(self, stream: S) -> Self::Future

Returns a future performing a TLS handshake over the stream.

Loading content...

Implementors

impl<S> TlsConnect<S> for NoTls[src]

Loading content...