pub trait Join {
// Required method
fn join(&mut self, other: Self);
}Expand description
State-based merge
§Laws
- Associativity: x ∨ (y ∨ z) = (x ∨ y) ∨ z
- Commutativity: x ∨ y = y ∨ x
- Idempotence: x ∨ x = x
- Identity: If
Self: Default, then x ∨Self::default()= x
where x ∨ y means x.join(y)
§References
- Join-semilattices on Wikipedia: https://en.wikipedia.org/wiki/Semilattice
- Rob Rix’s
semilatticesHaskell package: https://hackage.haskell.org/package/semilattices - State-based CRDTs: https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type#State-based_CRDTs
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".