[−][src]Trait treediff::Delegate
The delegate receiving callbacks by the diff
algorithm, which compares an old to a new value.
Type Parameters
K
is the Key's typeV
is the Value's type
Methods will be called if...
Provided methods
fn push<'b>(&mut self, _k: &'b K)
... we recurse into the Value
at the given Key
.
Delegates should memoize the current Key path to be able to compute the full Key path when needed.
fn pop(&mut self)
... we have processed all items and leave the object previously push
ed.
fn removed<'b>(&mut self, _k: &'b K, _v: &'a V)
... the Value v
at the given Key k
should be removed.
Note that the Key is partial, and should be used in conjunction with the recorded Keys
received via push(...)
fn added<'b>(&mut self, _k: &'b K, _v: &'a V)
.. the Value v
at the given Key k
should be added.
Note that the Key is partial, and should be used in conjunction with the recorded Keys
received via push(...)
fn unchanged(&mut self, _v: &'a V)
The Value v
was not changed.
fn modified(&mut self, _old: &'a V, _new: &'a V)
... the old
Value was modified, and is now the new
Value.
Implementors
impl<'a, K, V> Delegate<'a, K, V> for Recorder<'a, K, V> where
K: Clone,
[src]
K: Clone,
fn push(&mut self, k: &K)
[src]
fn pop(&mut self)
[src]
fn removed<'b>(&mut self, k: &'b K, v: &'a V)
[src]
fn added<'b>(&mut self, k: &'b K, v: &'a V)
[src]
fn unchanged<'b>(&mut self, v: &'a V)
[src]
fn modified<'b>(&mut self, v1: &'a V, v2: &'a V)
[src]
impl<'a, K, V, F, BF> Delegate<'a, K, V> for Merger<K, V, BF, F> where
V: Mutable<Key = K, Item = V> + Clone + 'a,
K: Clone + Display,
F: MutableFilter,
BF: BorrowMut<F>,
[src]
V: Mutable<Key = K, Item = V> + Clone + 'a,
K: Clone + Display,
F: MutableFilter,
BF: BorrowMut<F>,