pub trait Connector: Debug + Sync + Send {
type Stream: 'static + MayBeTls + AsyncRead + AsyncWrite + Unpin + Sync + Send;
fn connect<'s, 'c, 'a, C>(
&'s self,
configuration: &'c C
) -> Pin<Box<dyn Future<Output = Result<Self::Stream, Error>> + Sync + Send + 'a, Global>>ⓘ
where
's: 'a,
'c: 'a,
C: ConnectionConfiguration;
}
Associated Types
Required methods
This provider of connectivity takes care of resolving given address (which could be an IP, FQDN, URL…), establishing a connection and enabling (or not) TLS upgrade.