Trait treediff::tools::MutableFilter [] [src]

pub trait MutableFilter {
    fn resolve_conflict<'a, K, V: Clone>(&mut self,
                                         _keys: &[K],
                                         _old: &'a V,
                                         new: &'a V,
                                         _self: &mut V)
                                         -> Option<Cow<'a, V>> { ... } fn resolve_removal<'a, K, V: Clone>(&mut self,
                                        _keys: &[K],
                                        _removed: &'a V,
                                        _self: &mut V)
                                        -> Option<Cow<'a, V>> { ... } }

A filter to manipulate calls to be made to Values implementing the Mutable trait in calls made by the Merger Delegate.

This allows you to control the exact way merge operations are performed independently of the type implementing the Value trait, which usually is not under your control.

Provided Methods

Called during Delegate::modified(...), returns None to cause the Value at the keys to be removed, or any Value to be set in its place.

old is the previous value at the given keys path, and new is the one now at its place. _self provides access to the target of the merge operation.

Called during Delegate::removed(...), returns None to allow the Value at the keys path to be removed, or any Value to be set in its place instead.

removed is the Value which is to be removed.

Implementors