Enum tor_netdir::Timeliness
source · pub enum Timeliness {
Strict,
Timely,
Unchecked,
}
Expand description
How “timely” must a network directory be?
This enum is used as an argument when requesting a NetDir
object from
NetDirProvider
and other APIs, to specify how recent the information
must be in order to be useful.
Variants§
Strict
The network directory must be strictly timely.
That is, it must be based on a consensus that valid right now, with no tolerance for skew or consensus problems.
Avoid using this option if you could use Timeliness::Timely
instead.
Timely
The network directory must be roughly timely.
This is, it must be be based on a consensus that is not too far in the future, and not too far in the past.
(The tolerances for “too far” will depend on configuration.)
This is almost always the option that you want to use.
Unchecked
Any network directory is permissible, regardless of how untimely.
Avoid using this option if you could use Timeliness::Timely
instead.
Trait Implementations§
source§impl Clone for Timeliness
impl Clone for Timeliness
source§fn clone(&self) -> Timeliness
fn clone(&self) -> Timeliness
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Timeliness
impl Debug for Timeliness
source§impl PartialEq for Timeliness
impl PartialEq for Timeliness
source§fn eq(&self, other: &Timeliness) -> bool
fn eq(&self, other: &Timeliness) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for Timeliness
impl Eq for Timeliness
impl StructuralPartialEq for Timeliness
Auto Trait Implementations§
impl Freeze for Timeliness
impl RefUnwindSafe for Timeliness
impl Send for Timeliness
impl Sync for Timeliness
impl Unpin for Timeliness
impl UnwindSafe for Timeliness
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.