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.

Re-exportsΒ§

use futures::StreamExt; πŸ”’
use ruma::OwnedServerName; πŸ”’
use tuwunel_core::debug_warn; πŸ”’
use tuwunel_core::implement; πŸ”’
use tuwunel_core::smallvec::SmallVec; πŸ”’
use tuwunel_core::utils::IterStream; πŸ”’
use super::ShouldAttempt; πŸ”’

EnumsΒ§

WhenAllBackedOff
Selects how ranking handles a pool with no immediately eligible server.

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
Candidate servers for one fetch, with three entries stored inline.
Verdicts πŸ”’
A candidate pool paired with each server’s verdict, sorted and filtered in place by rank_from_verdicts.