#[non_exhaustive]pub enum RelayFlag {
Show 13 variants
Authority,
BadExit,
Exit,
Fast,
Guard,
HSDir,
MiddleOnly,
NoEdConsensus,
Stable,
StaleDesc,
Running,
Valid,
V2Dir,
}Expand description
Router status flags - one recognized directory flag on a single relay.
https://spec.torproject.org/dir-spec/consensus-formats.html#item:s
These flags come from a consensus directory document, and are used to describe what the authorities believe about the relay. If the document contained any flags that we didn’t recognize, they are not listed in this type.
TODO SPEC: Make the terminology the same everywhere.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Authority
Is this a directory authority?
BadExit
Is this relay marked as a bad exit?
Bad exits can be used as intermediate relays, but not to deliver traffic.
Exit
Is this relay marked as an exit for weighting purposes?
Fast
Is this relay considered “fast” above a certain threshold?
Guard
Is this relay suitable for use as a guard relay?
Clients choose their their initial relays from among the set of Guard relays.
HSDir
Does this relay participate on the onion service directory ring?
MiddleOnly
Set if this relay is considered “middle only”, not suitable to run as an exit or guard relay.
Note that this flag is only used by authorities as part of the voting process; clients do not and should not act based on whether it is set.
NoEdConsensus
If set, there is no consensus for the ed25519 key for this relay.
Stable
Is this relay considered “stable” enough for long-lived circuits?
StaleDesc
Set if the authorities are requesting a fresh descriptor for this relay.
Running
Set if this relay is currently running.
This flag can appear in votes, but in consensuses, every relay is assumed to be running.
Valid
Set if this relay is considered “valid” – allowed to be on the network.
This flag can appear in votes, but in consensuses, every relay is assumed to be valid.
V2Dir
Set if this relay supports a currently recognized version of the directory protocol.
Trait Implementations§
Source§impl EnumSetConstHelper for RelayFlag
impl EnumSetConstHelper for RelayFlag
Source§const CONST_INIT_HELPER: __EnumSetInitHelper = __EnumSetInitHelper
const CONST_INIT_HELPER: __EnumSetInitHelper = __EnumSetInitHelper
ConstInitHelper.Source§const CONST_OP_HELPER: __EnumSetOpHelper = __EnumSetOpHelper
const CONST_OP_HELPER: __EnumSetOpHelper = __EnumSetOpHelper
ConstOpHelper.Source§type ConstInitHelper = __EnumSetInitHelper
type ConstInitHelper = __EnumSetInitHelper
Source§type ConstOpHelper = __EnumSetOpHelper
type ConstOpHelper = __EnumSetOpHelper
Source§impl EnumSetTypePrivate for RelayFlag
impl EnumSetTypePrivate for RelayFlag
Source§const VARIANT_COUNT: u32 = 13u32
const VARIANT_COUNT: u32 = 13u32
Source§fn enum_into_u32(self) -> u32
fn enum_into_u32(self) -> u32
Source§unsafe fn enum_from_u32(val: u32) -> Self
unsafe fn enum_from_u32(val: u32) -> Self
Source§unsafe fn enum_from_u32_checked(val: u32) -> Self
unsafe fn enum_from_u32_checked(val: u32) -> Self
Source§impl PartialEq<EnumSet<RelayFlag>> for RelayFlag
impl PartialEq<EnumSet<RelayFlag>> for RelayFlag
impl Copy for RelayFlag
impl EnumSetType for RelayFlag
impl Eq for RelayFlag
Auto Trait Implementations§
impl Freeze for RelayFlag
impl RefUnwindSafe for RelayFlag
impl Send for RelayFlag
impl Sync for RelayFlag
impl Unpin for RelayFlag
impl UnsafeUnpin for RelayFlag
impl UnwindSafe for RelayFlag
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more