pub struct TlsConnector(/* private fields */);
Expand description
Tls Client Connector.
Use TlsConnector::connect() to get TlsStream for client.
Then use TlsStream::flush() to finish the handshake.
Implementations§
Source§impl TlsConnector
impl TlsConnector
pub fn new( config: Arc<ClientConfig>, server_name: ServerName, ) -> Result<Self, Error>
Sourcepub fn connect<T>(self, stream: T) -> TlsStream<ClientConnection, T>
pub fn connect<T>(self, stream: T) -> TlsStream<ClientConnection, T>
The stream
generally should implement AsyncRead and AsyncWrite.
Auto Trait Implementations§
impl Freeze for TlsConnector
impl !RefUnwindSafe for TlsConnector
impl Send for TlsConnector
impl Sync for TlsConnector
impl Unpin for TlsConnector
impl !UnwindSafe for TlsConnector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more