pub struct ClientConnectionContext<Evidence = ()> { /* private fields */ }Expand description
Immutable facts retained by a client-role connection.
Implementations§
Source§impl<Evidence> ClientConnectionContext<Evidence>
impl<Evidence> ClientConnectionContext<Evidence>
Sourcepub const fn target(&self) -> &ConnectTarget
pub const fn target(&self) -> &ConnectTarget
Returns the destination used for this connection.
Sourcepub const fn tls(&self) -> Option<ClientTlsStatus>
pub const fn tls(&self) -> Option<ClientTlsStatus>
Returns transport security once negotiation has completed.
Sourcepub const fn identity(&self) -> &Evidence
pub const fn identity(&self) -> &Evidence
Returns application-defined evidence from the authentication policy.
§Panics
Panics when called from middleware before authentication has completed.
Sourcepub const fn identity_if_known(&self) -> Option<&Evidence>
pub const fn identity_if_known(&self) -> Option<&Evidence>
Returns evidence only after authentication has enriched the context.
Sourcepub const fn backend_key(&self) -> Option<&CancelKey>
pub const fn backend_key(&self) -> Option<&CancelKey>
Returns the upstream cancellation key captured during startup readiness.
Trait Implementations§
Source§impl<Evidence: Clone> Clone for ClientConnectionContext<Evidence>
impl<Evidence: Clone> Clone for ClientConnectionContext<Evidence>
Source§fn clone(&self) -> ClientConnectionContext<Evidence>
fn clone(&self) -> ClientConnectionContext<Evidence>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Evidence: Debug> Debug for ClientConnectionContext<Evidence>
impl<Evidence: Debug> Debug for ClientConnectionContext<Evidence>
impl<Evidence: Eq> Eq for ClientConnectionContext<Evidence>
Source§impl<Evidence: PartialEq> PartialEq for ClientConnectionContext<Evidence>
impl<Evidence: PartialEq> PartialEq for ClientConnectionContext<Evidence>
impl<Evidence: PartialEq> StructuralPartialEq for ClientConnectionContext<Evidence>
Auto Trait Implementations§
impl<Evidence = ()> !Freeze for ClientConnectionContext<Evidence>
impl<Evidence> RefUnwindSafe for ClientConnectionContext<Evidence>where
Evidence: RefUnwindSafe,
impl<Evidence> Send for ClientConnectionContext<Evidence>where
Evidence: Send,
impl<Evidence> Sync for ClientConnectionContext<Evidence>where
Evidence: Sync,
impl<Evidence> Unpin for ClientConnectionContext<Evidence>where
Evidence: Unpin,
impl<Evidence> UnsafeUnpin for ClientConnectionContext<Evidence>where
Evidence: UnsafeUnpin,
impl<Evidence> UnwindSafe for ClientConnectionContext<Evidence>where
Evidence: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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