Function zkstate::diff[][src]

pub fn diff<'a, V, D>(l: &'a V, r: &'a V, d: &mut D) where
    V: Value<Item = V>,
    D: Delegate<'a, <V as Value>::Key, V>,
    <V as Value>::Key: Ord,
    <V as Value>::Key: Clone
Expand description

A generic diff algorithm suitable for Value types as seen in serialization/deserialization libraries.

Such types can represent any tree-like data structure, which will be traversed to find additions, removals, modifications and even portions that did not change at all.

Parameters

  • l - the left Value
  • r - the right Value
  • d - a Delegate to receive information about changes between l and r