pub enum LogicalTime {
Lamport(LamportTime),
Vector(VectorClock),
Hybrid(HybridTime),
}Expand description
Logical time values for heterogeneous clock types.
Variants§
Lamport(LamportTime)
Lamport clock time.
Vector(VectorClock)
Vector clock time.
Hybrid(HybridTime)
Hybrid clock time.
Implementations§
Source§impl LogicalTime
impl LogicalTime
Sourcepub const fn kind(&self) -> LogicalClockKind
pub const fn kind(&self) -> LogicalClockKind
Returns the logical clock kind for this time value.
Sourcepub fn causal_order(&self, other: &Self) -> CausalOrder
pub fn causal_order(&self, other: &Self) -> CausalOrder
Compares two logical times for causal ordering.
Returns the causal relationship between self and other.
For Lamport/Hybrid clocks this is derived from total/partial order;
for vector clocks this uses the vector clock causal order directly.
Returns CausalOrder::Concurrent if the clock types differ.
Trait Implementations§
Source§impl Clone for LogicalTime
impl Clone for LogicalTime
Source§fn clone(&self) -> LogicalTime
fn clone(&self) -> LogicalTime
Returns a duplicate 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 LogicalTime
impl Debug for LogicalTime
Source§impl PartialEq for LogicalTime
impl PartialEq for LogicalTime
Source§impl PartialOrd for LogicalTime
impl PartialOrd for LogicalTime
impl Eq for LogicalTime
impl StructuralPartialEq for LogicalTime
Auto Trait Implementations§
impl Freeze for LogicalTime
impl RefUnwindSafe for LogicalTime
impl Send for LogicalTime
impl Sync for LogicalTime
impl Unpin for LogicalTime
impl UnsafeUnpin for LogicalTime
impl UnwindSafe for LogicalTime
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).