Struct tor_netdoc::doc::netstatus::NsConsensusRouterStatus
source · #[non_exhaustive]pub struct NsConsensusRouterStatus {
pub rs: GenericRouterStatus<RdDigest>,
}
ns_consensus
only.Expand description
A single relay’s status, as represented in a “ns” consensus.
Only available if tor-netdoc
is built with the ns_consensus
feature.
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.rs: GenericRouterStatus<RdDigest>
dangerous-expose-struct-fields
only.Underlying generic routerstatus object.
This is private because we don’t want to leak that these two types have the same implementation “under the hood”.
Implementations§
source§impl NsConsensusRouterStatus
impl NsConsensusRouterStatus
sourcepub fn orport_addrs(&self) -> impl Iterator<Item = &SocketAddr>
pub fn orport_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Return an iterator of ORPort addresses for this routerstatus
sourcepub fn weight(&self) -> &RelayWeight
pub fn weight(&self) -> &RelayWeight
Return the declared weight of this routerstatus in the directory.
sourcepub fn addrs(&self) -> &[SocketAddr]
pub fn addrs(&self) -> &[SocketAddr]
Return the ORPort addresses of this routerstatus
sourcepub fn protovers(&self) -> &Protocols
pub fn protovers(&self) -> &Protocols
Return the protovers that this routerstatus says it implements.
sourcepub fn flags(&self) -> &RelayFlags
pub fn flags(&self) -> &RelayFlags
Return the relay flags of this routerstatus.
sourcepub fn ed25519_id_is_usable(&self) -> bool
pub fn ed25519_id_is_usable(&self) -> bool
Return true if the ed25519 identity on this relay reflects a true consensus among the authorities.
sourcepub fn is_flagged_bad_exit(&self) -> bool
pub fn is_flagged_bad_exit(&self) -> bool
Return true if this routerstatus is listed with the BadExit flag.
sourcepub fn is_flagged_v2dir(&self) -> bool
pub fn is_flagged_v2dir(&self) -> bool
Return true if this routerstatus is listed with the v2dir flag.
sourcepub fn is_flagged_exit(&self) -> bool
pub fn is_flagged_exit(&self) -> bool
Return true if this routerstatus is listed with the Exit flag.
sourcepub fn is_flagged_guard(&self) -> bool
pub fn is_flagged_guard(&self) -> bool
Return true if this routerstatus is listed with the Guard flag.
sourcepub fn is_flagged_hsdir(&self) -> bool
pub fn is_flagged_hsdir(&self) -> bool
Return true if this routerstatus is listed with the HSDir flag.
sourcepub fn is_flagged_stable(&self) -> bool
pub fn is_flagged_stable(&self) -> bool
Return true if this routerstatus is listed with the Stable flag.
sourcepub fn is_flagged_fast(&self) -> bool
pub fn is_flagged_fast(&self) -> bool
Return true if this routerstatus is listed with the Fast flag.
sourcepub fn is_flagged_middle_only(&self) -> bool
pub fn is_flagged_middle_only(&self) -> bool
Return true if this routerstatus is listed with the MiddleOnly flag.
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.
Trait Implementations§
source§impl Clone for NsConsensusRouterStatus
impl Clone for NsConsensusRouterStatus
source§fn clone(&self) -> NsConsensusRouterStatus
fn clone(&self) -> NsConsensusRouterStatus
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NsConsensusRouterStatus
impl Debug for NsConsensusRouterStatus
source§impl ParseRouterStatus for NsConsensusRouterStatus
impl ParseRouterStatus for NsConsensusRouterStatus
source§fn flavor() -> ConsensusFlavor
fn flavor() -> ConsensusFlavor
source§fn from_section(
sec: &Section<'_, NetstatusKwd>
) -> Result<NsConsensusRouterStatus>
fn from_section( sec: &Section<'_, NetstatusKwd> ) -> Result<NsConsensusRouterStatus>
Section
object containing its
elements.source§impl RouterStatus for NsConsensusRouterStatus
impl RouterStatus for NsConsensusRouterStatus
source§fn rsa_identity(&self) -> &RsaIdentity
fn rsa_identity(&self) -> &RsaIdentity
Return the expected microdescriptor digest for this routerstatus
§type DocumentDigest = [u8; 20]
type DocumentDigest = [u8; 20]
source§fn doc_digest(&self) -> &RdDigest
fn doc_digest(&self) -> &RdDigest
Auto Trait Implementations§
impl Freeze for NsConsensusRouterStatus
impl RefUnwindSafe for NsConsensusRouterStatus
impl Send for NsConsensusRouterStatus
impl Sync for NsConsensusRouterStatus
impl Unpin for NsConsensusRouterStatus
impl UnwindSafe for NsConsensusRouterStatus
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
§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>
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