pub struct RoutingEngine { /* private fields */ }Expand description
Routes tool calls based on config + match report.
Immutable after construction: callers rebuild the engine whenever the match report changes (e.g., upstream reconnect).
Implementations§
Source§impl RoutingEngine
impl RoutingEngine
pub fn new(config: ProxyRoutingConfig, report: MatchReport) -> Self
Sourcepub fn decide(&self, requested_name: &str) -> RoutingDecision
pub fn decide(&self, requested_name: &str) -> RoutingDecision
Resolve the executor for the given tool name (with or without prefix).
Emits a tracing::info event with structured fields for every call.
Sourcepub fn decide_quiet(&self, requested_name: &str) -> RoutingDecision
pub fn decide_quiet(&self, requested_name: &str) -> RoutingDecision
Same as Self::decide, but does not emit a tracing event. Useful from tests or
from diagnostic commands that render the decision themselves.
Sourcepub fn config(&self) -> &ProxyRoutingConfig
pub fn config(&self) -> &ProxyRoutingConfig
Expose the underlying config for observability / debug commands.
Sourcepub fn report(&self) -> &MatchReport
pub fn report(&self) -> &MatchReport
Expose the match report for observability / debug commands.
Auto Trait Implementations§
impl Freeze for RoutingEngine
impl RefUnwindSafe for RoutingEngine
impl Send for RoutingEngine
impl Sync for RoutingEngine
impl Unpin for RoutingEngine
impl UnsafeUnpin for RoutingEngine
impl UnwindSafe for RoutingEngine
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