pub enum Lane {
Rejected,
Denied,
Transient,
Fatal,
}Expand description
Which of the four lanes an outcome travels in.
Variants§
Implementations§
Source§impl Lane
impl Lane
Sourcepub fn of(e: &(dyn Error + 'static)) -> Option<Lane>
pub fn of(e: &(dyn Error + 'static)) -> Option<Lane>
Walks source() looking for a concrete lane payload, reporting only
which lane it found. Allocation-free, so it is the one to reach for
in a predicate; find_in (private — reached through
Fault::classify) is the same walk when you need the payload.
None means either the chain is not lanes-aware, or it bottoms out
in a Rejected(D) whose D is not known here — a caller that needs
the rejected value must go through crate::Failure instead.
A bare Exhausted (not wrapped in a Fatal, which is how
[crate::profile::NarrowTransient] always produces one) is still
Fatal: it is a terminal outcome by construction, and its own
source() is the last Transient it gave up on, which this walker
must not mistake for the chain’s own classification.
Trait Implementations§
impl Copy for Lane
impl Eq for Lane
impl StructuralPartialEq for Lane
Auto Trait Implementations§
impl Freeze for Lane
impl RefUnwindSafe for Lane
impl Send for Lane
impl Sync for Lane
impl Unpin for Lane
impl UnsafeUnpin for Lane
impl UnwindSafe for Lane
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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