Struct tokio_native_tls::TlsConnector [−][src]
pub struct TlsConnector(_);
A wrapper around a native_tls::TlsConnector, providing an async connect
method.
Implementations
impl TlsConnector[src]
impl TlsConnector[src]pub async fn connect<S>(
&self,
domain: &str,
stream: S
) -> Result<TlsStream<S>, Error> where
S: AsyncRead + AsyncWrite + Unpin, [src]
&self,
domain: &str,
stream: S
) -> Result<TlsStream<S>, Error> where
S: AsyncRead + AsyncWrite + Unpin,
Connects the provided stream with this connector, assuming the provided domain.
This function will internally call TlsConnector::connect to connect
the stream and returns a future representing the resolution of the
connection operation. The returned future will resolve to either
TlsStream<S> or Error depending if it’s successful or not.
This is typically used for clients who have already established, for example, a TCP connection to a remote server. That stream is then provided here to perform the client half of a connection to a TLS-powered server.
Trait Implementations
impl Clone for TlsConnector[src]
impl Clone for TlsConnector[src]fn clone(&self) -> TlsConnector[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl From<TlsConnector> for TlsConnector[src]
impl From<TlsConnector> for TlsConnector[src]