pub trait Crdt {
// Required method
fn merge(&mut self, other: &Self);
}Expand description
Core trait that all CRDTs must implement.
A CRDT (Conflict-free Replicated Data Type) guarantees that concurrent updates on different replicas will converge to the same state after merging, without requiring coordination.
§Properties
All implementations must satisfy:
- Commutativity:
a.merge(b) == b.merge(a) - Associativity:
a.merge(b.merge(c)) == a.merge(b).merge(c) - Idempotency:
a.merge(a) == a
Required Methods§
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.