pub struct RoutingDecision {
pub timestamp_ms: i64,
pub phase: RoutingPhase,
pub from: Option<TransportType>,
pub to: Option<TransportType>,
pub winning_score: Option<f32>,
pub reason_code: Option<RoutingReasonCode>,
pub scores: Vec<(TransportType, TransportScore)>,
}Expand description
A single structured routing decision.
Populated by the DORS callback installed by
OfflineProtocol::install_telemetry_sink. The scores field is only
populated when TelemetryConfig::routing_diagnostic is true; at the
default verbosity the vector is empty, keeping the hot-path allocation
free.
A future PR will introduce a Suppressed phase carrying hysteresis /
cooldown / stability detail; that variant and its payload were excluded
from this record on purpose so the shape can be designed alongside the
emit sites that produce it.
Fields§
§timestamp_ms: i64Emission timestamp (milliseconds since Unix epoch).
phase: RoutingPhaseWhich kind of decision this is.
from: Option<TransportType>Previous transport, when applicable.
to: Option<TransportType>Chosen / target transport, when applicable.
winning_score: Option<f32>Total score of the winning transport, when applicable.
reason_code: Option<RoutingReasonCode>Reason for the decision, when one applies.
scores: Vec<(TransportType, TransportScore)>Full per-transport score breakdown. Empty unless
TelemetryConfig::routing_diagnostic is enabled.
Implementations§
Trait Implementations§
Source§impl Clone for RoutingDecision
impl Clone for RoutingDecision
Source§fn clone(&self) -> RoutingDecision
fn clone(&self) -> RoutingDecision
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RoutingDecision
impl RefUnwindSafe for RoutingDecision
impl Send for RoutingDecision
impl Sync for RoutingDecision
impl Unpin for RoutingDecision
impl UnsafeUnpin for RoutingDecision
impl UnwindSafe for RoutingDecision
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<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> ⓘ
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