Skip to main content

Mergeable

Trait Mergeable 

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

Source

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.

Implementors§

Source§

impl Mergeable for GCounter

Source§

impl Mergeable for PnCounter

Source§

impl<K: Ord + Clone> Mergeable for EnableWinsFlag<K>

Source§

impl<K: Ord + Clone, V: Ord + Clone> Mergeable for LwwMap<K, V>

Source§

impl<P: Ord + Clone, V: Ord + Clone> Mergeable for Rga<P, V>

Source§

impl<T: Ord + Clone> Mergeable for GSet<T>

Source§

impl<T: Ord + Clone, K: Ord + Clone> Mergeable for OrSet<T, K>

Source§

impl<V: Ord + Clone> Mergeable for LwwRegister<V>