Struct tor_netdoc::doc::netstatus::MdConsensusRouterStatus
source · #[non_exhaustive]pub struct MdConsensusRouterStatus {
pub rs: GenericRouterStatus<MdDigest>,
}
Expand description
A single relay’s status, as represented in a microdesc consensus.
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<MdDigest>
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 MdConsensusRouterStatus
impl MdConsensusRouterStatus
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 MdConsensusRouterStatus
impl Clone for MdConsensusRouterStatus
source§fn clone(&self) -> MdConsensusRouterStatus
fn clone(&self) -> MdConsensusRouterStatus
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MdConsensusRouterStatus
impl Debug for MdConsensusRouterStatus
source§impl ParseRouterStatus for MdConsensusRouterStatus
impl ParseRouterStatus for MdConsensusRouterStatus
source§fn flavor() -> ConsensusFlavor
fn flavor() -> ConsensusFlavor
source§fn from_section(
sec: &Section<'_, NetstatusKwd>
) -> Result<MdConsensusRouterStatus>
fn from_section( sec: &Section<'_, NetstatusKwd> ) -> Result<MdConsensusRouterStatus>
Section
object containing its
elements.source§impl RouterStatus for MdConsensusRouterStatus
impl RouterStatus for MdConsensusRouterStatus
source§fn rsa_identity(&self) -> &RsaIdentity
fn rsa_identity(&self) -> &RsaIdentity
Return the expected microdescriptor digest for this routerstatus
§type DocumentDigest = [u8; 32]
type DocumentDigest = [u8; 32]
source§fn doc_digest(&self) -> &MdDigest
fn doc_digest(&self) -> &MdDigest
Auto Trait Implementations§
impl Freeze for MdConsensusRouterStatus
impl RefUnwindSafe for MdConsensusRouterStatus
impl Send for MdConsensusRouterStatus
impl Sync for MdConsensusRouterStatus
impl Unpin for MdConsensusRouterStatus
impl UnwindSafe for MdConsensusRouterStatus
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