pub struct LamportClock { /* private fields */ }Expand description
A simple Lamport logical clock.
Implementations§
Source§impl LamportClock
impl LamportClock
Sourcepub fn with_value(value: u64) -> Self
pub fn with_value(value: u64) -> Self
Create with initial value.
Sourcepub fn merge(&mut self, other: &LamportClock)
pub fn merge(&mut self, other: &LamportClock)
Merge with another clock.
Trait Implementations§
Source§impl Clone for LamportClock
impl Clone for LamportClock
Source§fn clone(&self) -> LamportClock
fn clone(&self) -> LamportClock
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 LamportClock
impl Debug for LamportClock
Source§impl Default for LamportClock
impl Default for LamportClock
Source§fn default() -> LamportClock
fn default() -> LamportClock
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LamportClock
impl<'de> Deserialize<'de> for LamportClock
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 LamportClock
impl RefUnwindSafe for LamportClock
impl Send for LamportClock
impl Sync for LamportClock
impl Unpin for LamportClock
impl UnsafeUnpin for LamportClock
impl UnwindSafe for LamportClock
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