pub struct HybridClock { /* private fields */ }Expand description
A hybrid logical clock combining physical time with logical counters.
Implementations§
Source§impl HybridClock
impl HybridClock
Sourcepub fn tick(&mut self) -> HybridTimestamp
pub fn tick(&mut self) -> HybridTimestamp
Generate a new timestamp.
Sourcepub fn receive(&mut self, other: &HybridTimestamp) -> HybridTimestamp
pub fn receive(&mut self, other: &HybridTimestamp) -> HybridTimestamp
Update from a received timestamp.
Trait Implementations§
Source§impl Clone for HybridClock
impl Clone for HybridClock
Source§fn clone(&self) -> HybridClock
fn clone(&self) -> HybridClock
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 HybridClock
impl Debug for HybridClock
Source§impl<'de> Deserialize<'de> for HybridClock
impl<'de> Deserialize<'de> for HybridClock
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HybridClock
impl RefUnwindSafe for HybridClock
impl Send for HybridClock
impl Sync for HybridClock
impl Unpin for HybridClock
impl UnsafeUnpin for HybridClock
impl UnwindSafe for HybridClock
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