Struct tokio_rustls::TlsConnector
source · [−]pub struct TlsConnector { /* private fields */ }
Expand description
A wrapper around a rustls::ClientConfig
, providing an async connect
method.
Implementations
sourceimpl TlsConnector
impl TlsConnector
pub fn connect<IO>(&self, domain: DNSNameRef<'_>, stream: IO) -> Connect<IO>ⓘNotable traits for Connect<IO>impl<IO: AsyncRead + AsyncWrite + Unpin> Future for Connect<IO> type Output = Result<TlsStream<IO>>;
where
IO: AsyncRead + AsyncWrite + Unpin,
pub fn connect_with<IO, F>(
&self,
domain: DNSNameRef<'_>,
stream: IO,
f: F
) -> Connect<IO>ⓘNotable traits for Connect<IO>impl<IO: AsyncRead + AsyncWrite + Unpin> Future for Connect<IO> type Output = Result<TlsStream<IO>>;
where
IO: AsyncRead + AsyncWrite + Unpin,
F: FnOnce(&mut ClientSession),
Trait Implementations
sourceimpl Clone for TlsConnector
impl Clone for TlsConnector
sourcefn clone(&self) -> TlsConnector
fn clone(&self) -> TlsConnector
Returns a copy of the value. Read more
1.0.0const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl From<Arc<ClientConfig>> for TlsConnector
impl From<Arc<ClientConfig>> for TlsConnector
sourcefn from(inner: Arc<ClientConfig>) -> TlsConnector
fn from(inner: Arc<ClientConfig>) -> TlsConnector
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for TlsConnector
impl Send for TlsConnector
impl Sync for TlsConnector
impl Unpin for TlsConnector
impl !UnwindSafe for TlsConnector
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more