Flag

Enum Flag 

Source
pub enum Flag {
Show 16 variants Authority, BadExit, BadDirectory, Exit, Fast, Guard, HsDir, Named, NoEdConsensus, Running, Stable, StaleDesc, Unnamed, V2Dir, V3Dir, Valid,
}
Expand description

Flags assigned to Tor relays by directory authorities.

These flags indicate various characteristics of relays and are used for path selection and relay classification.

§Flag Meanings

Flags are assigned based on relay behavior and capabilities:

§Example

use stem_rs::Flag;

let flag = Flag::Guard;
println!("Relay flag: {}", flag); // Prints "Guard"

Variants§

§

Authority

Relay is a directory authority.

This relay is one of the trusted directory authorities that vote on the network consensus.

§

BadExit

Relay shouldn’t be used as an exit due to being problematic or malicious.

The relay has been flagged for bad behavior when used as an exit node.

§

BadDirectory

Relay shouldn’t be used for directory information.

Note: This flag was removed from Tor but may appear in older descriptors.

§

Exit

Relay’s exit policy makes it useful as an exit node.

The relay allows exiting to a reasonable number of ports.

§

Fast

Relay is suitable for high-bandwidth circuits.

The relay has sufficient bandwidth for performance-sensitive traffic.

§

Guard

Relay is suitable for being an entry guard (first hop).

The relay is stable and fast enough to be used as a guard node.

§

HsDir

Relay is being used as a hidden service directory.

The relay stores and serves hidden service descriptors.

§

Named

Relay can be referred to by its nickname.

The nickname is unique and verified.

§

NoEdConsensus

Relay’s Ed25519 key doesn’t match the consensus.

There’s a mismatch in the relay’s Ed25519 identity.

§

Running

Relay is currently usable.

The relay is online and responding to connections.

§

Stable

Relay is suitable for long-lived circuits.

The relay has good uptime and is reliable for persistent connections.

§

StaleDesc

Relay descriptor is outdated and should be re-uploaded.

The relay’s descriptor is stale and needs to be refreshed.

§

Unnamed

Relay isn’t currently bound to a nickname.

The nickname is not verified or is shared with other relays.

§

V2Dir

Relay supports the v2 directory protocol.

The relay can serve directory information via the v2 protocol.

§

V3Dir

Relay supports the v3 directory protocol.

The relay can serve directory information via the v3 protocol.

§

Valid

Relay has been validated.

The relay’s identity has been verified by the directory authorities.

Trait Implementations§

Source§

impl Clone for Flag

Source§

fn clone(&self) -> Flag

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Flag

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Flag

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for Flag

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Flag

Source§

fn eq(&self, other: &Flag) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Flag

Source§

impl Eq for Flag

Source§

impl StructuralPartialEq for Flag

Auto Trait Implementations§

§

impl Freeze for Flag

§

impl RefUnwindSafe for Flag

§

impl Send for Flag

§

impl Sync for Flag

§

impl Unpin for Flag

§

impl UnwindSafe for Flag

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.