Trait tor_netdoc::doc::netstatus::ParseRouterStatus
source · [−]pub trait ParseRouterStatus: Sized + Sealed {
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
fn 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.
fn flavor() -> ConsensusFlavor
fn flavor() -> ConsensusFlavor
Return the networkstatus consensus flavor in which this routerstatus appears.