pub trait TlsConnect<S> {
type Stream: TlsStream + Unpin;
type Error: Into<Box<dyn Error + Sync + Send>>;
type Future: Future<Output = Result<Self::Stream, Self::Error>>;
// Required method
fn connect(self, stream: S) -> Self::Future;
}
Expand description
An asynchronous function wrapping a stream in a TLS session.