pub struct DecisionRouter { /* private fields */ }Implementations§
Source§impl DecisionRouter
impl DecisionRouter
pub fn new(config: RouterConfig) -> Self
Sourcepub fn evaluate(&self, context: &StructuredContext) -> DecisionBackendResult
pub fn evaluate(&self, context: &StructuredContext) -> DecisionBackendResult
Evaluate a StructuredContext through the routing pipeline.
Uses interior mutability (RefCell) to track circuit breaker state
across calls without requiring &mut self.
Sourcepub fn evaluate_with_profile(
&self,
context: &StructuredContext,
profile: UserBehaviorProfile,
) -> DecisionBackendResult
pub fn evaluate_with_profile( &self, context: &StructuredContext, profile: UserBehaviorProfile, ) -> DecisionBackendResult
Evaluate with an explicit behavior profile. Callers that already have a
UserBehaviorProfile (e.g. the daemon after aggregating recent feedback)
should use this so personalized backends receive user_id and history.
Sourcepub fn evaluate_model_input(&self, input: &ModelInput) -> DecisionBackendResult
pub fn evaluate_model_input(&self, input: &ModelInput) -> DecisionBackendResult
Evaluate a model input that includes the current window plus optional behavior profile and recent feedback memory.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DecisionRouter
impl !RefUnwindSafe for DecisionRouter
impl Send for DecisionRouter
impl !Sync for DecisionRouter
impl Unpin for DecisionRouter
impl UnsafeUnpin for DecisionRouter
impl !UnwindSafe for DecisionRouter
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