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: ServerName, 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: ServerName,
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 ClientConnection),
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.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more