pub struct Lifetime { /* private fields */ }
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

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.

Return true if this consensus is officially valid at the provided time.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.