pub trait VectorClock {
// Required methods
fn dominates(&self, other: &Self) -> bool;
fn missing(&self, other: &Self) -> Vec<Cursor>;
fn merge(&mut self, other: &Self);
fn merge_least(&mut self, other: &Self);
fn compare(&self, other: &Self) -> ClockOrdering;
fn apply(&mut self, cursor: &Cursor);
}Expand description
common functions w.r.t vector clock types
mostly used as an extension trait to GlobalCursor
Required Methods§
Sourcefn dominates(&self, other: &Self) -> bool
fn dominates(&self, other: &Self) -> bool
Returns true if this clock dominates (has seen all updates of) the other
Sourcefn missing(&self, other: &Self) -> Vec<Cursor>
fn missing(&self, other: &Self) -> Vec<Cursor>
gets all dependencies in other that are not in self.
Sourcefn merge(&mut self, other: &Self)
fn merge(&mut self, other: &Self)
Merges another clock into this one by taking the max ordering per node
Sourcefn merge_least(&mut self, other: &Self)
fn merge_least(&mut self, other: &Self)
Merges another clock into this one by taking the min ordering per node
Sourcefn compare(&self, other: &Self) -> ClockOrdering
fn compare(&self, other: &Self) -> ClockOrdering
Compares this clock to another to determine their relative ordering
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.