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
sourceimpl 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.
Trait Implementations
sourceimpl Clone for NsConsensusRouterStatus
impl Clone for NsConsensusRouterStatus
sourcefn clone(&self) -> NsConsensusRouterStatus
fn clone(&self) -> NsConsensusRouterStatus
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl Debug for NsConsensusRouterStatus
impl Debug for NsConsensusRouterStatus
sourceimpl ParseRouterStatus for NsConsensusRouterStatus
impl ParseRouterStatus for NsConsensusRouterStatus
sourcefn flavor() -> ConsensusFlavor
fn flavor() -> ConsensusFlavor
sourcefn from_section(
sec: &Section<'_, NetstatusKwd>
) -> Result<NsConsensusRouterStatus>
fn from_section(
sec: &Section<'_, NetstatusKwd>
) -> Result<NsConsensusRouterStatus>
Section object containing its
elements. Read moresourceimpl RouterStatus for NsConsensusRouterStatus
impl RouterStatus for NsConsensusRouterStatus
sourcefn rsa_identity(&self) -> &RsaIdentity
fn rsa_identity(&self) -> &RsaIdentity
Return the expected microdescriptor digest for this routerstatus