Trait tor_netdoc::doc::netstatus::ParseRouterStatus
source · pub trait ParseRouterStatus: Sized + Sealed {
// Required methods
fn from_section(sec: &Section<'_, NetstatusKwd>) -> Result<Self>;
fn flavor() -> ConsensusFlavor;
}
Expand description
Trait to parse a single relay as listed in a consensus document.
TODO(nickm): I’d rather not have this trait be public, but I haven’t yet figured out how to make it private.
Required Methods§
sourcefn from_section(sec: &Section<'_, NetstatusKwd>) -> Result<Self>
fn from_section(sec: &Section<'_, NetstatusKwd>) -> Result<Self>
Parse this object from a Section
object containing its
elements.
sourcefn flavor() -> ConsensusFlavor
fn flavor() -> ConsensusFlavor
Return the networkstatus consensus flavor in which this routerstatus appears.
Object Safety§
This trait is not object safe.
Implementors§
impl ParseRouterStatus for MdConsensusRouterStatus
impl ParseRouterStatus for NsConsensusRouterStatus
Available on crate feature
ns_consensus
only.