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 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.