Struct tor_netdoc::doc::routerdesc::RouterDesc
source · [−]pub struct RouterDesc { /* private fields */ }
Expand description
Information about a relay, parsed from a router descriptor.
This type does not hold all the information in the router descriptor
Limitations
See module documentation.
Additionally, some fields that from router descriptors are not yet parsed: see the comments in ROUTER_BODY_RULES for information about those.
Before using this type to connect to a relay, you MUST check that it is valid, using is_expired_at().
Implementations
sourceimpl RouterDesc
impl RouterDesc
sourcepub fn parse(s: &str) -> Result<UncheckedRouterDesc>
pub fn parse(s: &str) -> Result<UncheckedRouterDesc>
Try to parse s
as a router descriptor.
Does not actually check liveness or signatures; you need to do that yourself before you can do the output.
Auto Trait Implementations
impl RefUnwindSafe for RouterDesc
impl Send for RouterDesc
impl Sync for RouterDesc
impl Unpin for RouterDesc
impl UnwindSafe for RouterDesc
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