pub struct TlsClient { /* private fields */ }Expand description
TLS outgoing connection wrapper.
Only IO-based streams are supported.
Pass this to Connector::wrapped to apply TLS
encryption to each outgoing link.
§Panics
Panics if a packet-based stream is supplied.
Implementations§
Source§impl TlsClient
impl TlsClient
Sourcepub fn new(
client_cfg: Arc<ClientConfig>,
server_name: ServerName<'static>,
) -> Self
pub fn new( client_cfg: Arc<ClientConfig>, server_name: ServerName<'static>, ) -> Self
Creates a new TLS outgoing connection wrapper.
The identity of the server is verified using TLS against server_name.
The outgoing link is encrypted using TLS with the configuration specified
in client_cfg.
Trait Implementations§
Source§impl ConnectingWrapper for TlsClient
impl ConnectingWrapper for TlsClient
Auto Trait Implementations§
impl Freeze for TlsClient
impl !RefUnwindSafe for TlsClient
impl Send for TlsClient
impl Sync for TlsClient
impl Unpin for TlsClient
impl !UnwindSafe for TlsClient
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