pub struct TlsConnector<C> { /* private fields */ }
Expand description
A connector for establishing TLS connections over an inner connector.
This connector wraps another connector (typically a TCP or Unix socket connector)
and adds TLS encryption to the connection. The underlying TLS implentation
can be either rustls
or native-tls
depending on the feature flags. Set th
native-tls
feature to use the native-tls
implementation.
Implementations§
Source§impl<C> TlsConnector<C>
impl<C> TlsConnector<C>
pub const fn new(inner_connector: C, tls_connector: MonoioTlsConnector) -> Self
pub fn new_with_tls_default(inner_connector: C, alpn: Option<Vec<&str>>) -> Self
pub fn inner_connector(&self) -> &C
pub fn tls_connector(&self) -> &MonoioTlsConnector
Trait Implementations§
Source§impl<C: Clone> Clone for TlsConnector<C>
impl<C: Clone> Clone for TlsConnector<C>
Source§fn clone(&self) -> TlsConnector<C>
fn clone(&self) -> TlsConnector<C>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<C, T, CN> Connector<T> for TlsConnector<C>where
T: AsRef<ServerName<'static>>,
for<'a> C: Connector<&'a T, Error = Error, Connection = CN>,
CN: AsyncReadRent + AsyncWriteRent,
impl<C, T, CN> Connector<T> for TlsConnector<C>where
T: AsRef<ServerName<'static>>,
for<'a> C: Connector<&'a T, Error = Error, Connection = CN>,
CN: AsyncReadRent + AsyncWriteRent,
type Connection = Stream<CN, ClientConnection>
type Error = TlsError
Source§impl<C: Debug> Debug for TlsConnector<C>
impl<C: Debug> Debug for TlsConnector<C>
Auto Trait Implementations§
impl<C> Freeze for TlsConnector<C>where
C: Freeze,
impl<C> !RefUnwindSafe for TlsConnector<C>
impl<C> Send for TlsConnector<C>where
C: Send,
impl<C> Sync for TlsConnector<C>where
C: Sync,
impl<C> Unpin for TlsConnector<C>where
C: Unpin,
impl<C> !UnwindSafe for TlsConnector<C>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)