pub struct RouteDecision {
pub target: RouteTarget,
pub routing: Routing,
pub reason: String,
}Expand description
A router-v2 decision: the target, the full scored routing (backbone row
included, id BACKBONE_CLASS_ID) and a human-readable reason.
Fields§
§target: RouteTarget§routing: Routing§reason: StringImplementations§
Source§impl RouteDecision
impl RouteDecision
Sourcepub fn forced(target: RouteTarget, reason: impl Into<String>) -> Self
pub fn forced(target: RouteTarget, reason: impl Into<String>) -> Self
A decision nobody computed: the caller pinned the target
(--skill <id>, --skill none, --route backbone, or a file
without routing). No scores, novelty NaN.
Sourcepub fn target_label(&self) -> &str
pub fn target_label(&self) -> &str
"backbone" or the skill id.
Sourcepub fn e_base(&self) -> Option<f32>
pub fn e_base(&self) -> Option<f32>
Unit error E of the backbone class (router-v2 decisions only).
Sourcepub fn e_skill(&self) -> Option<f32>
pub fn e_skill(&self) -> Option<f32>
Unit error E of the nearest SKILL class (the best non-backbone row; for a legacy file the argmin winner).
Sourcepub fn nearest_skill(&self) -> Option<&str>
pub fn nearest_skill(&self) -> Option<&str>
The nearest skill’s id (whether or not it won).
Sourcepub fn describe(&self) -> String
pub fn describe(&self) -> String
One human line: route: <target> | novelty … | E_base … | E_skill … | <reason> (the stderr / server-log form).
Sourcepub fn summary_json(&self) -> Value
pub fn summary_json(&self) -> Value
The decision as the tools and serve report it:
{target, novelty, e_base, e_skill, reason} (non-finite → null).
Trait Implementations§
Source§impl Clone for RouteDecision
impl Clone for RouteDecision
Auto Trait Implementations§
impl Freeze for RouteDecision
impl RefUnwindSafe for RouteDecision
impl Send for RouteDecision
impl Sync for RouteDecision
impl Unpin for RouteDecision
impl UnsafeUnpin for RouteDecision
impl UnwindSafe for RouteDecision
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