Skip to main content

Module selector

Module selector 

Source
Expand description

Score-weighted selection over a list of (name, score) candidates.

The selector is the hook that lets a fallback chain (or any other higher-level orchestrator) consult the reliability score. The pattern:

  1. Each candidate runs its extraction and produces a ReliabilityScore.
  2. The orchestrator hands all (name, score) pairs to ScoreWeightedSelector::pick_best.
  3. The candidate with the highest overall score wins; ties are broken by the first registered candidate (preserving the registration order so callers retain control).

The selector is pure and stateless — pass it into any orchestrator without wiring concerns.

Structs§

ScoreWeightedSelector
Stateless selector that picks the highest-scoring ScoredCandidate.
ScoredCandidate
A (name, score) candidate for ScoreWeightedSelector.