[][src]Trait postgres::tls::TlsConnect

pub trait TlsConnect<S> {
    type Stream: TlsStream + Unpin;
    type Error: Into<Box<dyn Error + 'static + Send + Sync, Global>>;
    type Future: Future;
    pub fn connect(self, stream: S) -> Self::Future;
}

An asynchronous function wrapping a stream in a TLS session.

Associated Types

type Stream: TlsStream + Unpin[src]

The stream returned by the future.

type Error: Into<Box<dyn Error + 'static + Send + Sync, Global>>[src]

The error returned by the future.

type Future: Future[src]

The future returned by the connector.

Loading content...

Required methods

pub fn connect(self, stream: S) -> Self::Future[src]

Returns a future performing a TLS handshake over the stream.

Loading content...

Implementors

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

type Stream = NoTlsStream

type Error = NoTlsError

type Future = NoTlsFuture

Loading content...