Struct tor_netdoc::doc::netstatus::Lifetime [−][src]
pub struct Lifetime { /* fields omitted */ }
Expand description
The lifetime of a networkstatus document.
In a consensus, this type describes when the consensus may safely be used. In a vote, this type describes the proposed lifetime for a consensus.
Implementations
pub fn new(
valid_after: SystemTime,
fresh_until: SystemTime,
valid_until: SystemTime
) -> Result<Self>
pub fn new(
valid_after: SystemTime,
fresh_until: SystemTime,
valid_until: SystemTime
) -> Result<Self>
Construct a new Lifetime.
Return time when this consensus first becomes valid.
(You might see a consensus a little while before this time, since voting tries to finish up before the.)
Return time when this consensus is no longer fresh.
You can use the consensus after this time, but there is (or is supposed to be) a better one by this point.
Return the time when this consensus is no longer valid.
You should try to get a better consensus after this time, though it’s okay to keep using this one if no more recent one can be found.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Lifetime
impl UnwindSafe for Lifetime
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V