pub trait Lattice: Clone + PartialEq {
// Required methods
fn bottom() -> Self;
fn join(&self, other: &Self) -> Self;
// Provided methods
fn partial_cmp_lattice(&self, other: &Self) -> Option<Ordering> { ... }
fn leq(&self, other: &Self) -> bool { ... }
fn join_assign(&mut self, other: &Self) { ... }
}Expand description
The core CRDT trait. All state-based CRDTs implement this.
Required Methods§
Provided Methods§
Sourcefn partial_cmp_lattice(&self, other: &Self) -> Option<Ordering>
fn partial_cmp_lattice(&self, other: &Self) -> Option<Ordering>
Partial order derived from join: a ≤ b iff a ⊔ b = b
Sourcefn join_assign(&mut self, other: &Self)
fn join_assign(&mut self, other: &Self)
Join-assign: self = self ⊔ other
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.