Struct tor_netdoc::doc::netstatus::NsConsensusRouterStatus
source · [−]#[non_exhaustive]pub struct NsConsensusRouterStatus {
pub rs: GenericRouterStatus<RdDigest>,
}
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>
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
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for NsConsensusRouterStatus
impl Debug for NsConsensusRouterStatus
sourceimpl ParseRouterStatus for NsConsensusRouterStatus
impl ParseRouterStatus for NsConsensusRouterStatus
sourcefn flavor() -> ConsensusFlavor
fn flavor() -> ConsensusFlavor
Return the networkstatus consensus flavor in which this routerstatus appears. Read more
sourcefn from_section(
sec: &Section<'_, NetstatusKwd>
) -> Result<NsConsensusRouterStatus>
fn from_section(
sec: &Section<'_, NetstatusKwd>
) -> Result<NsConsensusRouterStatus>
Parse this object from a Section
object containing its
elements. Read more
sourceimpl 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
type DocumentDigest = [u8; 20]
type DocumentDigest = [u8; 20]
A digest of the document that’s identified by this RouterStatus.
sourcefn doc_digest(&self) -> &RdDigest
fn doc_digest(&self) -> &RdDigest
Return the digest of the document identified by this routerstatus. Read more
Auto Trait Implementations
impl RefUnwindSafe for NsConsensusRouterStatus
impl Send for NsConsensusRouterStatus
impl Sync for NsConsensusRouterStatus
impl Unpin for NsConsensusRouterStatus
impl UnwindSafe for NsConsensusRouterStatus
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more