pub struct TlsClientEndpoint<E, T> { /* private fields */ }Expand description
Compose connection establishment with a TLS client handshake. The server identity is explicit and independent of the underlying endpoint’s routing address.
Implementations§
Source§impl<E, T> TlsClientEndpoint<E, T>
impl<E, T> TlsClientEndpoint<E, T>
Sourcepub fn new(endpoint: E, connector: T, server_name: impl Into<String>) -> Self
pub fn new(endpoint: E, connector: T, server_name: impl Into<String>) -> Self
Describe a TLS connection using a configured provider and the identity to authenticate. No I/O is performed until connect is polled.
Sourcepub fn server_name(&self) -> &str
pub fn server_name(&self) -> &str
The server identity supplied to the connector.
Trait Implementations§
Source§impl<S, E, T> ConnectEndpoint<S> for TlsClientEndpoint<E, T>
impl<S, E, T> ConnectEndpoint<S> for TlsClientEndpoint<E, T>
Source§type Connection = <T as TlsConnector<S, <E as ConnectEndpoint<S>>::Connection>>::Connection
type Connection = <T as TlsConnector<S, <E as ConnectEndpoint<S>>::Connection>>::Connection
The established transport, owned by the caller on success.
Source§async fn connect(
&self,
scheduler: &S,
cancellation: &Cancellation,
) -> OperationResult<Self::Connection>
async fn connect( &self, scheduler: &S, cancellation: &Cancellation, ) -> OperationResult<Self::Connection>
Establish one connection. Futures are lazy. Await completion after requesting cooperative cancellation so implementation-owned asynchronous cleanup can finish. Dropping a future abandons it and provides ordinary resource destruction, not an asynchronous cleanup guarantee.
Auto Trait Implementations§
impl<E, T> Freeze for TlsClientEndpoint<E, T>
impl<E, T> RefUnwindSafe for TlsClientEndpoint<E, T>where
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<E, T> Send for TlsClientEndpoint<E, T>
impl<E, T> Sync for TlsClientEndpoint<E, T>
impl<E, T> Unpin for TlsClientEndpoint<E, T>
impl<E, T> UnsafeUnpin for TlsClientEndpoint<E, T>where
E: UnsafeUnpin,
T: UnsafeUnpin,
impl<E, T> UnwindSafe for TlsClientEndpoint<E, T>where
E: UnwindSafe,
T: UnwindSafe,
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