Enum tor_netdir::WeightRole [−][src]
#[non_exhaustive]
pub enum WeightRole {
Guard,
Middle,
Exit,
BeginDir,
Unweighted,
}
Expand description
Possible ways to weight relays when selecting them a random.
Relays are weighted by a function of their bandwidth that depends on how scarce that “kind” of bandwidth is. For example, if Exit bandwidth is rare, then Exits should be less likely to get chosen for the middle hop of a path.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Guard
Selecting a relay to use as a guard
Middle
Selecting a relay to use as a middle relay in a circuit.
Exit
Selecting a relay to use to deliver traffic to the internet.
BeginDir
Selecting a relay for a one-hop BEGIN_DIR directory request.
Unweighted
Selecting a relay with no additional weight beyond its bandwidth.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for WeightRole
impl Send for WeightRole
impl Sync for WeightRole
impl Unpin for WeightRole
impl UnwindSafe for WeightRole
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more