Struct tor_hscrypto::RevisionCounter
source · pub struct RevisionCounter(/* private fields */);
Expand description
Counts which revision of an onion service descriptor is which, within a given time period.
There can be gaps in this numbering. A descriptor with a higher-valued revision counter supersedes one with a lower revision counter.
Methods from Deref<Target = u64>§
pub const MIN: u64 = 0u64
pub const MAX: u64 = 18_446_744_073_709_551_615u64
pub const BITS: u32 = 64u32
Trait Implementations§
source§impl Clone for RevisionCounter
impl Clone for RevisionCounter
source§fn clone(&self) -> RevisionCounter
fn clone(&self) -> RevisionCounter
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RevisionCounter
impl Debug for RevisionCounter
source§impl Deref for RevisionCounter
impl Deref for RevisionCounter
source§impl From<RevisionCounter> for u64
impl From<RevisionCounter> for u64
source§fn from(original: RevisionCounter) -> Self
fn from(original: RevisionCounter) -> Self
Converts to this type from the input type.
source§impl From<u64> for RevisionCounter
impl From<u64> for RevisionCounter
source§fn from(original: u64) -> RevisionCounter
fn from(original: u64) -> RevisionCounter
Converts to this type from the input type.
source§impl Ord for RevisionCounter
impl Ord for RevisionCounter
source§fn cmp(&self, other: &RevisionCounter) -> Ordering
fn cmp(&self, other: &RevisionCounter) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for RevisionCounter
impl PartialEq for RevisionCounter
source§fn eq(&self, other: &RevisionCounter) -> bool
fn eq(&self, other: &RevisionCounter) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for RevisionCounter
impl PartialOrd for RevisionCounter
source§fn partial_cmp(&self, other: &RevisionCounter) -> Option<Ordering>
fn partial_cmp(&self, other: &RevisionCounter) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for RevisionCounter
impl Eq for RevisionCounter
impl StructuralPartialEq for RevisionCounter
Auto Trait Implementations§
impl Freeze for RevisionCounter
impl RefUnwindSafe for RevisionCounter
impl Send for RevisionCounter
impl Sync for RevisionCounter
impl Unpin for RevisionCounter
impl UnwindSafe for RevisionCounter
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more