Skip to main content

Module rank

Module rank 

Source
Expand description

Verdict-ranked candidate selection shared by the fetcher and backfill.

A caller hands an eligibility-filtered, priority-ordered server list to [rank_candidates]; the per-server ShouldAttempt verdict reorders and drops it.

Enums§

WhenAllBackedOff
Behavior when every candidate is backed off (no Yes or Deprioritize verdict in the pool).

Functions§

rank_from_verdicts 🔒
Order Yes before Deprioritize before No, preserving input order within each rank, then drop No unless every candidate is backed off and when_all is Attempt.

Type Aliases§

Candidates
A candidate server pool for one fetch: the hint, room servers, and mxid hosts. Inline budget 3 holds the common single-event case (event origin, room origin, optional hint) on the stack; larger room-derived pools spill to the heap.
Verdicts 🔒
A candidate pool paired with each server’s verdict, sorted and filtered in place by rank_from_verdicts.