pub struct HybridLogicalClock {
pub physical: u64,
pub logical: u64,
}Expand description
Hybrid Logical Clock: (physical timestamp, logical counter) pair. Combines wall-clock time (microsecond resolution typical) with a per-node monotonic counter that breaks ties between events recorded in the same physical instant.
This is the K_cascade = 2 case of versioning: the outer level (physical) is coarse; the inner level (logical) refines tied physical timestamps. Same architectural pattern as Umbra prefix
- actual content, applied to time.
Fields§
§physical: u64§logical: u64Implementations§
Source§impl HybridLogicalClock
impl HybridLogicalClock
pub const fn new(physical: u64, logical: u64) -> Self
Sourcepub fn now() -> Self
pub fn now() -> Self
Construct from the current wall clock (microseconds since UNIX epoch), with logical counter starting at 0.
Trait Implementations§
Source§impl Clone for HybridLogicalClock
impl Clone for HybridLogicalClock
Source§fn clone(&self) -> HybridLogicalClock
fn clone(&self) -> HybridLogicalClock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for HybridLogicalClock
Source§impl Debug for HybridLogicalClock
impl Debug for HybridLogicalClock
impl Eq for HybridLogicalClock
Source§impl Hash for HybridLogicalClock
impl Hash for HybridLogicalClock
Source§impl Ord for HybridLogicalClock
impl Ord for HybridLogicalClock
1.21.0 (const: unstable) · 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 HybridLogicalClock
impl PartialEq for HybridLogicalClock
Source§impl PartialOrd for HybridLogicalClock
impl PartialOrd for HybridLogicalClock
impl StructuralPartialEq for HybridLogicalClock
Auto Trait Implementations§
impl Freeze for HybridLogicalClock
impl RefUnwindSafe for HybridLogicalClock
impl Send for HybridLogicalClock
impl Sync for HybridLogicalClock
impl Unpin for HybridLogicalClock
impl UnsafeUnpin for HybridLogicalClock
impl UnwindSafe for HybridLogicalClock
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