RequestMatcher

Trait RequestMatcher 

Source
pub trait RequestMatcher: Send + Sync {
    // Required methods
    fn match_score(&self, request: &ProtocolRequest) -> f64;
    fn protocol(&self) -> Protocol;
}
Expand description

Trait for request matching across protocols

Required Methods§

Source

fn match_score(&self, request: &ProtocolRequest) -> f64

Match a request and return a score (higher = better match)

Source

fn protocol(&self) -> Protocol

Get the protocol this matcher handles

Implementors§