pub trait Mergeable {
// Required method
fn merge(&mut self, other: &Self) -> Result<(), MergeError>;
}Expand description
State-based merge contract: merge is expected to be a semilattice join.
For in-house types, this contract is backed by the Lean proof suite and
differential conformance corpus. For user-defined types, it is a tested
contract enforced by the laws harness, not a proof. Admission is a separate
obligation: user-defined CRDTs must implement Crdt::validate_record.
Required Methods§
Sourcefn merge(&mut self, other: &Self) -> Result<(), MergeError>
fn merge(&mut self, other: &Self) -> Result<(), MergeError>
Join compatible states, returning an error if their replica domains differ.
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.