Trait treediff::Mutable [] [src]

pub trait Mutable {
    type Key;
    type Item;
    fn set(&mut self, keys: &[Self::Key], new: &Self::Item);
    fn remove(&mut self, keys: &[Self::Key]);
}

A trait to allow changing any Value.

Associated Types

The Key type used to find Values in a mapping.

The Value type itself.

Required Methods

Set the new Value at the path identified by keys.

Intermediate container values (like HashMaps, Arrays) must be created until the last Key in keys can be modified or inserted with new.

Remove the value located at the path identified by keys.

If the value does not exist, just return. Intermediate container values must not be created.

Implementors