LatticeMerger

Trait LatticeMerger 

Source
pub trait LatticeMerger: Send + Sync {
    // Required method
    fn merge(
        &self,
        current: Option<&Value>,
        delta: &Value,
    ) -> TireaResult<Value>;
}
Expand description

Type-erased lattice merge function.

Required Methods§

Source

fn merge(&self, current: Option<&Value>, delta: &Value) -> TireaResult<Value>

Merge a delta into the current value.

If current is None (field missing), the delta is returned directly. Otherwise, deserializes both, calls Lattice::merge, and serializes the result.

Implementors§