pub struct CarrierContext { /* private fields */ }Expand description
Carrier class of an accepted RPC connection, as attested by the accept boundary that constructed it.
Trusted-local constructors are pub(crate): only this crate’s transport
accept boundaries (in-memory inproc, UDS/systemd listeners) can mint a
trusted context. Untrusted constructors are freely public — classifying a
carrier as untrusted is always safe.
Implementations§
Source§impl CarrierContext
impl CarrierContext
Sourcepub fn web_transport() -> Self
pub fn web_transport() -> Self
A native WebTransport carrier. Untrusted, without browser provenance.
Sourcepub fn browser_web_transport() -> Self
pub fn browser_web_transport() -> Self
Browser WebTransport selected by the dedicated accept-boundary path.
Sourcepub fn untrusted_unknown() -> Self
pub fn untrusted_unknown() -> Self
Unknown/ambiguous carrier. Untrusted (the fail-closed default any new accept path should start from until it is deliberately classified).
Sourcepub fn forbids_cleartext_envelope(&self) -> bool
pub fn forbids_cleartext_envelope(&self) -> bool
Whether this carrier forbids cleartext request envelopes (INV-2).
true for every network/unknown carrier; false only for the
explicitly trusted same-host classes.
Trait Implementations§
Source§impl Clone for CarrierContext
impl Clone for CarrierContext
Source§fn clone(&self) -> CarrierContext
fn clone(&self) -> CarrierContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CarrierContext
impl Debug for CarrierContext
Source§impl Display for CarrierContext
impl Display for CarrierContext
Source§impl PartialEq for CarrierContext
impl PartialEq for CarrierContext
Source§fn eq(&self, other: &CarrierContext) -> bool
fn eq(&self, other: &CarrierContext) -> bool
self and other values to be equal, and is used by ==.impl Copy for CarrierContext
impl Eq for CarrierContext
impl StructuralPartialEq for CarrierContext
Auto Trait Implementations§
impl Freeze for CarrierContext
impl RefUnwindSafe for CarrierContext
impl Send for CarrierContext
impl Sync for CarrierContext
impl Unpin for CarrierContext
impl UnsafeUnpin for CarrierContext
impl UnwindSafe for CarrierContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more