pub struct RoutingFeedback { /* private fields */ }Expand description
Collects proxy routing decisions and their measured outcomes.
Implementations§
Source§impl RoutingFeedback
impl RoutingFeedback
Sourcepub fn record_decision(
&self,
original: &str,
routed: &str,
reason: &str,
) -> String
pub fn record_decision( &self, original: &str, routed: &str, reason: &str, ) -> String
Records a route selection until its measured outcome arrives.
Sourcepub fn record_outcome_for_decision(
&self,
decision_id: &str,
quality: Option<f64>,
tokens_saved: u64,
latency_delta_ms: i64,
)
pub fn record_outcome_for_decision( &self, decision_id: &str, quality: Option<f64>, tokens_saved: u64, latency_delta_ms: i64, )
Records measured quality for a route and forwards it to the tracker.
Sourcepub fn record_outcome(
&self,
original: &str,
routed: &str,
quality: Option<f64>,
tokens_saved: u64,
latency_delta_ms: i64,
)
pub fn record_outcome( &self, original: &str, routed: &str, quality: Option<f64>, tokens_saved: u64, latency_delta_ms: i64, )
Records measured quality for a route and forwards it to the tracker.
Sourcepub fn should_use_fallback(&self) -> bool
pub fn should_use_fallback(&self) -> bool
Returns whether tracked route quality warrants fallback.
Trait Implementations§
Source§impl Clone for RoutingFeedback
impl Clone for RoutingFeedback
Source§fn clone(&self) -> RoutingFeedback
fn clone(&self) -> RoutingFeedback
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 Debug for RoutingFeedback
impl Debug for RoutingFeedback
Auto Trait Implementations§
impl Freeze for RoutingFeedback
impl RefUnwindSafe for RoutingFeedback
impl Send for RoutingFeedback
impl Sync for RoutingFeedback
impl Unpin for RoutingFeedback
impl UnsafeUnpin for RoutingFeedback
impl UnwindSafe for RoutingFeedback
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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