pub trait MemoryRouter: Send + Sync {
// Required method
fn route(&self, query: &str) -> MemoryRoute;
// Provided method
fn route_with_confidence(&self, query: &str) -> RoutingDecision { ... }
}Expand description
Decides which memory backend(s) to query for a given input.
Required Methods§
Sourcefn route(&self, query: &str) -> MemoryRoute
fn route(&self, query: &str) -> MemoryRoute
Route a query to the appropriate backend(s).
Provided Methods§
Sourcefn route_with_confidence(&self, query: &str) -> RoutingDecision
fn route_with_confidence(&self, query: &str) -> RoutingDecision
Route with a confidence signal. Default implementation wraps route() with confidence 1.0.
Override this in routers that can express ambiguity (e.g. HeuristicRouter)
so that HybridRouter can escalate uncertain decisions to LLM.