[−][src]Struct debra_common::epoch::Epoch
A monotonically increasing epoch counter with wrapping overflow behaviour.
Methods
impl Epoch
[src]
pub fn new() -> Self
[src]
Creates a new Epoch
starting at zero.
pub fn relative_age(
self,
global_epoch: Epoch
) -> Result<PossibleAge, Undetermined>
[src]
self,
global_epoch: Epoch
) -> Result<PossibleAge, Undetermined>
Returns the PossibleAge
of the epoch relative to global_epoch
.
Since the global epoch is explicitly allowed to wrap around, it is not possible to unambiguously determine the relative age of an epoch. However, since epochs are monotonically increasing it is certain that any previously observed epoch must be older of equal than the global epoch. Consequently, it is possible to determine if an epoch could be within the critical range of two epochs, during which reclamation of records must be avoided, and is in order to be conservative.
Trait Implementations
impl Ord for Epoch
[src]
fn cmp(&self, other: &Epoch) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl Clone for Epoch
[src]
fn clone(&self) -> Epoch
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Epoch
[src]
impl Default for Epoch
[src]
impl PartialEq<Epoch> for Epoch
[src]
impl Eq for Epoch
[src]
impl PartialOrd<Epoch> for Epoch
[src]
fn partial_cmp(&self, other: &Epoch) -> Option<Ordering>
[src]
fn lt(&self, other: &Epoch) -> bool
[src]
fn le(&self, other: &Epoch) -> bool
[src]
fn gt(&self, other: &Epoch) -> bool
[src]
fn ge(&self, other: &Epoch) -> bool
[src]
impl Debug for Epoch
[src]
impl Display for Epoch
[src]
impl Add<usize> for Epoch
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: usize) -> Self::Output
[src]
impl Sub<usize> for Epoch
[src]
Auto Trait Implementations
impl Sync for Epoch
impl Unpin for Epoch
impl Send for Epoch
impl UnwindSafe for Epoch
impl RefUnwindSafe for Epoch
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self