Skip to main content

rank_with

Function rank_with 

Source
pub fn rank_with<S: RankingStrategy + ?Sized>(
    strategy: &S,
    frames: Vec<(String, ContextFrame)>,
) -> Vec<(String, ContextFrame)>
Expand description

Apply a RankingStrategy, returning the frames best-first.

The strategy’s permutation is checked, not trusted: an out-of-range or repeated index is skipped and anything the strategy left unplaced is appended in canonical order (score descending, FrameId ascending). The output is therefore always a permutation of the input, whoever wrote the strategy — which is what keeps the composition audit a total partition of the evidence the host offered.