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][tests] for how to use this type. [tests]: https://github.com/Byron/treediff-rs/blob/master/tests/diff.rs#L21
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]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl<'a, K: PartialEq, V: PartialEq + 'a> PartialEq for Recorder<'a, K, V>[src]
fn eq(&self, __arg_0: &Recorder<'a, K, V>) -> bool[src]
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[src]
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]
K: Clone,
fn push<'b>(&mut self, k: &'b K)[src]
... we recurse into the Value at the given Key. Read more
fn pop(&mut self)[src]
... we have processed all items and leave the object previously pushed.
fn removed<'b>(&mut self, k: &'b K, v: &'a V)[src]
... the Value v at the given Key k should be removed. Read more
fn added<'b>(&mut self, k: &'b K, v: &'a V)[src]
.. the Value v at the given Key k should be added. Read more
fn unchanged<'b>(&mut self, v: &'a V)[src]
The Value v was not changed.
fn modified<'b>(&mut self, v1: &'a V, v2: &'a V)[src]
... the old Value was modified, and is now the new Value.