Skip to main content

TlsClientEndpoint

Struct TlsClientEndpoint 

Source
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>

Source

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.

Source

pub fn endpoint(&self) -> &E

The underlying endpoint description.

Source

pub fn server_name(&self) -> &str

The server identity supplied to the connector.

Trait Implementations§

Source§

impl<E: Clone, T: Clone> Clone for TlsClientEndpoint<E, T>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S, E, T> ConnectEndpoint<S> for TlsClientEndpoint<E, T>
where S: Sync + ?Sized, E: ConnectEndpoint<S>, T: TlsConnector<S, E::Connection>,

Source§

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>

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.
Source§

impl<E: Debug, T: Debug> Debug for TlsClientEndpoint<E, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<E, T> Freeze for TlsClientEndpoint<E, T>
where E: Freeze, T: Freeze,

§

impl<E, T> RefUnwindSafe for TlsClientEndpoint<E, T>

§

impl<E, T> Send for TlsClientEndpoint<E, T>
where E: Send, T: Send,

§

impl<E, T> Sync for TlsClientEndpoint<E, T>
where E: Sync, T: Sync,

§

impl<E, T> Unpin for TlsClientEndpoint<E, T>
where E: Unpin, T: Unpin,

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.