VectorClock

Trait VectorClock 

Source
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§

Source

fn dominates(&self, other: &Self) -> bool

Returns true if this clock dominates (has seen all updates of) the other

Source

fn missing(&self, other: &Self) -> Vec<Cursor>

gets all dependencies in other that are not in self.

Source

fn merge(&mut self, other: &Self)

Merges another clock into this one by taking the max ordering per node

Source

fn merge_least(&mut self, other: &Self)

Merges another clock into this one by taking the min ordering per node

Source

fn compare(&self, other: &Self) -> ClockOrdering

Compares this clock to another to determine their relative ordering

Source

fn apply(&mut self, cursor: &Cursor)

apply a single update to this clock

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.

Implementors§