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§

source

fn from_section(sec: &Section<'_, NetstatusKwd>) -> Result<Self>

Parse this object from a Section object containing its elements.

source

fn flavor() -> ConsensusFlavor

Return the networkstatus consensus flavor in which this routerstatus appears.

Implementors§

source§

impl ParseRouterStatus for MdConsensusRouterStatus

source§

impl ParseRouterStatus for NsConsensusRouterStatus

Available on crate feature ns_consensus only.