#[non_exhaustive]pub enum RoutingReasonCode {
InitialSelection,
PrimarySelected,
PrimarySuccess,
FallbackSuccess,
EscalationApplied,
CurrentUnavailable,
RetryThreshold,
PoorSignal,
Congestion,
LowTtl,
LowSuccessRate,
}Expand description
Top-level reason space for routing decisions.
Unifies the legacy DorsReasonCode (selection/switch reasons) and
DorsEscalationReasonCode (escalation reasons) into a single flat enum
that a sink can match on without juggling multiple legacy code spaces.
#[non_exhaustive] so new reasons can be added.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InitialSelection
Initial selection at protocol start.
PrimarySelected
Primary transport selected on merit.
PrimarySuccess
Primary transport’s last send succeeded.
FallbackSuccess
Fallback transport’s last send succeeded.
EscalationApplied
Escalation fallback was applied end-to-end.
Current transport became unavailable.
RetryThreshold
Retry-failure threshold tripped escalation.
PoorSignal
Sustained poor signal tripped escalation.
Congestion
Sustained congestion tripped escalation.
LowTtl
Low TTL headroom tripped escalation.
LowSuccessRate
Sustained low success rate tripped escalation.
Trait Implementations§
Source§impl Clone for RoutingReasonCode
impl Clone for RoutingReasonCode
Source§fn clone(&self) -> RoutingReasonCode
fn clone(&self) -> RoutingReasonCode
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 moreimpl Copy for RoutingReasonCode
Source§impl Debug for RoutingReasonCode
impl Debug for RoutingReasonCode
impl Eq for RoutingReasonCode
Source§impl PartialEq for RoutingReasonCode
impl PartialEq for RoutingReasonCode
impl StructuralPartialEq for RoutingReasonCode
Auto Trait Implementations§
impl Freeze for RoutingReasonCode
impl RefUnwindSafe for RoutingReasonCode
impl Send for RoutingReasonCode
impl Sync for RoutingReasonCode
impl Unpin for RoutingReasonCode
impl UnsafeUnpin for RoutingReasonCode
impl UnwindSafe for RoutingReasonCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
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> ⓘ
Converts
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> ⓘ
Converts
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