Enum tor_netdir::DirEvent
source · #[non_exhaustive]#[repr(u16)]pub enum DirEvent {
NewConsensus,
NewDescriptors,
}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
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
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<DirEvent> for DirEvent
impl PartialEq<DirEvent> for DirEvent
source§impl TryFrom<u16> for DirEvent
impl TryFrom<u16> for DirEvent
§type Error = TryFromPrimitiveError<DirEvent>
type Error = TryFromPrimitiveError<DirEvent>
The type returned in the event of a conversion error.
source§impl TryFromPrimitive for DirEvent
impl TryFromPrimitive for DirEvent
impl Copy for DirEvent
impl Eq for DirEvent
impl StructuralEq for DirEvent
impl StructuralPartialEq for DirEvent
Auto Trait Implementations§
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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.