Skip to main content

RoutingResolver

Trait RoutingResolver 

Source
pub trait RoutingResolver: Send {
    // Required methods
    fn resolve(&self, from: &str, candidates: &[String]) -> Option<Vec<String>>;
    fn learn(&mut self, from: &str, to: &str, quality: f64);
}
Expand description

Trait for routing resolution — implemented by pe-matrix MatrixRouter.

Required Methods§

Source

fn resolve(&self, from: &str, candidates: &[String]) -> Option<Vec<String>>

Select candidates using learned routing. Returns None to fall back.

Source

fn learn(&mut self, from: &str, to: &str, quality: f64)

Record a transition for learning.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§