#[non_exhaustive]pub struct Header {
pub flavor: ConsensusFlavor,
pub lifetime: Lifetime,
pub client_versions: Vec<String>,
pub relay_versions: Vec<String>,
pub proto_statuses: Arc<ProtoStatuses>,
pub params: NetParams<i32>,
pub voting_delay: Option<(u32, u32)>,
pub consensus_method: u32,
pub shared_rand_prev: Option<SharedRandStatus>,
pub shared_rand_cur: Option<SharedRandStatus>,
}
plain-consensus
only.Expand description
The header of a networkstatus.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.flavor: ConsensusFlavor
dangerous-expose-struct-fields
only.What kind of consensus document is this? Absent in votes and in ns-flavored consensuses.
lifetime: Lifetime
dangerous-expose-struct-fields
only.Over what time is this consensus valid? (For votes, this is the time over which the voted-upon consensus should be valid.)
client_versions: Vec<String>
dangerous-expose-struct-fields
only.List of recommended Tor client versions.
relay_versions: Vec<String>
dangerous-expose-struct-fields
only.List of recommended Tor relay versions.
proto_statuses: Arc<ProtoStatuses>
dangerous-expose-struct-fields
only.Lists of recommended and required subprotocols.
params: NetParams<i32>
dangerous-expose-struct-fields
only.Declared parameters for tunable settings about how to the network should operator. Some of these adjust timeouts and whatnot; some features things on and off.
voting_delay: Option<(u32, u32)>
dangerous-expose-struct-fields
only.How long in seconds should voters wait for votes and signatures (respectively) to propagate?
consensus_method: u32
dangerous-expose-struct-fields
only.What “method” was used to produce this consensus? (A consensus method is a version number used by authorities to upgrade the consensus algorithm.)
dangerous-expose-struct-fields
only.Global shared-random value for the previous shared-random period.
dangerous-expose-struct-fields
only.Global shared-random value for the current shared-random period.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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<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