ScoreCombiner

Trait ScoreCombiner 

Source
pub trait ScoreCombiner:
    Default
    + Clone
    + Send
    + Copy
    + 'static {
    // Required methods
    fn update<TScorer: Scorer>(&mut self, scorer: &mut TScorer);
    fn clear(&mut self);
    fn score(&self) -> Score;
}
Expand description

The ScoreCombiner trait defines how to compute an overall score given a list of scores.

Required Methods§

Source

fn update<TScorer: Scorer>(&mut self, scorer: &mut TScorer)

Aggregates the score combiner with the given scorer.

The ScoreCombiner may decide to call .scorer.score() or not.

Source

fn clear(&mut self)

Clears the score combiner state back to its initial state.

Source

fn score(&self) -> Score

Returns the aggregate score.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§