[go: up one dir, main page]

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

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]

[src]

Formats the value using the given formatter. Read more

impl<'a, K: PartialEq, V: PartialEq + 'a> PartialEq for Recorder<'a, K, V>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<'a, K, V> Default for Recorder<'a, K, V>
[src]

[src]

Returns the "default value" for a type. Read more

impl<'a, K, V> Delegate<'a, K, V> for Recorder<'a, K, V> where
    K: Clone
[src]

[src]

... we recurse into the Value at the given Key. Read more

[src]

... we have processed all items and leave the object previously pushed.

[src]

... the Value v at the given Key k should be removed. Read more

[src]

.. the Value v at the given Key k should be added. Read more

[src]

The Value v was not changed.

[src]

... the old Value was modified, and is now the new Value.

Auto Trait Implementations

impl<'a, K, V> Send for Recorder<'a, K, V> where
    K: Send,
    V: Sync

impl<'a, K, V> Sync for Recorder<'a, K, V> where
    K: Sync,
    V: Sync