Enum tor_netdir::DirEvent
source · #[non_exhaustive]#[repr(u16)]pub enum DirEvent {
NewConsensus = 0,
NewDescriptors = 1,
}
Expand description
An event that a NetDirProvider
can broadcast to indicate that a change in
the status of its directory.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NewConsensus = 0
A new consensus has been received, and has enough information to be used.
This event is also broadcast when a new set of consensus parameters is available, even if that set of parameters comes from a configuration change rather than from the latest consensus.
NewDescriptors = 1
New descriptors have been received for the current consensus.
(This event is not broadcast when receiving new descriptors for a consensus which is not yet ready to replace the current consensus.)
Trait Implementations§
source§impl IntoEnumIterator for DirEvent
impl IntoEnumIterator for DirEvent
type Iterator = DirEventIter
fn iter() -> DirEventIter ⓘ
source§impl PartialEq for DirEvent
impl PartialEq for DirEvent
impl Copy for DirEvent
impl Eq for DirEvent
impl StructuralPartialEq for DirEvent
Auto Trait Implementations§
impl Freeze for DirEvent
impl RefUnwindSafe for DirEvent
impl Send for DirEvent
impl Sync for DirEvent
impl Unpin for DirEvent
impl UnwindSafe for DirEvent
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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