Struct treediff::tools::Recorder
[−]
[src]
pub struct Recorder<'a, K, V: 'a> { pub calls: Vec<ChangeType<'a, K, V>>, // some fields omitted }
A Delegate
to record all calls made to it.
It can be useful if you don't want to implement your own custom delegate, but instead just want
to quickly see a flat list of all results of the diff
run.
Examples
Please see the tests for how to use this type.
Fields
calls: Vec<ChangeType<'a, K, V>>
A list of all calls the diff
function made on us.
Trait Implementations
impl<'a, K: Debug, V: Debug + 'a> Debug for Recorder<'a, K, V>
[src]
impl<'a, K: PartialEq, V: PartialEq + 'a> PartialEq for Recorder<'a, K, V>
[src]
fn eq(&self, __arg_0: &Recorder<'a, K, V>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Recorder<'a, K, V>) -> bool
This method tests for !=
.
impl<'a, K, V> Default for Recorder<'a, K, V>
[src]
impl<'a, K, V> Delegate<'a, K, V> for Recorder<'a, K, V> where K: Clone
[src]
fn push<'b>(&mut self, k: &'b K)
... we recurse into the Value
at the given Key
. Read more
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. Read more
fn added<'b>(&mut self, k: &'b K, v: &'a V)
.. the Value v
at the given Key k
should be added. Read more
fn unchanged<'b>(&mut self, v: &'a V)
The Value v
was not changed.
fn modified<'b>(&mut self, v1: &'a V, v2: &'a V)
... the old
Value was modified, and is now the new
Value.