pub struct RoutingScore(pub f64);Expand description
Score produced by signal aggregation, mapped to a RouterTier.
Tuple Fields§
§0: f64Implementations§
Source§impl RoutingScore
impl RoutingScore
Sourcepub fn new(raw: f64) -> RoutingScore
pub fn new(raw: f64) -> RoutingScore
Create a new score, clamped to [0.0, 1.0].
Sourcepub fn to_tier(&self, high_threshold: f64, low_threshold: f64) -> RouterTier
pub fn to_tier(&self, high_threshold: f64, low_threshold: f64) -> RouterTier
Map the score to a routing tier using configurable thresholds.
Sourcepub fn needs_refinement(&self, margin: f64) -> bool
pub fn needs_refinement(&self, margin: f64) -> bool
Returns true if the score is close enough to a threshold boundary
that an LLM classifier could refine the decision.
Trait Implementations§
Source§impl Clone for RoutingScore
impl Clone for RoutingScore
Source§fn clone(&self) -> RoutingScore
fn clone(&self) -> RoutingScore
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 RoutingScore
Source§impl Debug for RoutingScore
impl Debug for RoutingScore
Source§impl<'de> Deserialize<'de> for RoutingScore
impl<'de> Deserialize<'de> for RoutingScore
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RoutingScore, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RoutingScore, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RoutingScore
impl Serialize for RoutingScore
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for RoutingScore
impl RefUnwindSafe for RoutingScore
impl Send for RoutingScore
impl Sync for RoutingScore
impl Unpin for RoutingScore
impl UnsafeUnpin for RoutingScore
impl UnwindSafe for RoutingScore
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