Skip to main content

order_by

Function order_by 

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

Rank frames with a host’s ranking::RankingStrategy, then place the ranking at the attention-favored edges with fold_to_edges — the general form of order_by_value, which is this with ranking::ScoreDescending.

Placement and ranking are separable and stay separated: every strategy yields a best-first total order, and the fold is the same either way.