Skip to main content

ScoringStrategy

Trait ScoringStrategy 

Source
pub trait ScoringStrategy: Send + Sync {
    // Required method
    fn score(&self, ctx: &ProviderScoreContext) -> f32;
}
Expand description

Trait for pluggable scoring strategies.

Implement this to customize how providers are ranked.

Required Methods§

Source

fn score(&self, ctx: &ProviderScoreContext) -> f32

Score a provider given its context. Returns a value in [0.0, 1.0].

Implementors§