pub struct IndexVectorClock {
pub clock: BTreeMap<String, u64>,
}Fields§
§clock: BTreeMap<String, u64>Implementations§
Source§impl IndexVectorClock
impl IndexVectorClock
pub fn new() -> Self
pub fn increment(&mut self, node_id: &str)
pub fn merge(&mut self, other: &IndexVectorClock)
pub fn happens_before(&self, other: &IndexVectorClock) -> bool
pub fn concurrent_with(&self, other: &IndexVectorClock) -> bool
Trait Implementations§
Source§impl Clone for IndexVectorClock
impl Clone for IndexVectorClock
Source§impl Debug for IndexVectorClock
impl Debug for IndexVectorClock
Source§impl<'de> Deserialize<'de> for IndexVectorClock
impl<'de> Deserialize<'de> for IndexVectorClock
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 IndexVectorClock
impl RefUnwindSafe for IndexVectorClock
impl Send for IndexVectorClock
impl Sync for IndexVectorClock
impl Unpin for IndexVectorClock
impl UnsafeUnpin for IndexVectorClock
impl UnwindSafe for IndexVectorClock
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