pub trait Delegate<'a, K, V> {
// Provided methods
fn push(&mut self, _k: &K) { ... }
fn pop(&mut self) { ... }
fn removed<'b>(&mut self, _k: &'b K, _v: &'a V) { ... }
fn added<'b>(&mut self, _k: &'b K, _v: &'a V) { ... }
fn unchanged(&mut self, _v: &'a V) { ... }
fn modified(&mut self, _old: &'a V, _new: &'a V) { ... }
}Expand description
The delegate receiving callbacks by the diff algorithm, which compares an old to a new value.
§Type Parameters
Kis the Key’s typeVis the Value’s type
Methods will be called if…
Provided Methods§
Sourcefn push(&mut self, _k: &K)
fn push(&mut self, _k: &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.
Sourcefn removed<'b>(&mut self, _k: &'b K, _v: &'a V)
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(...)