[][src]Trait treediff::Mutable

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

type Key

The Key type used to find Values in a mapping.

type Item

The Value type itself.

Loading content...

Required methods

fn set(&mut self, keys: &[Self::Key], new: &Self::Item)

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.

fn remove(&mut self, keys: &[Self::Key])

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.

Loading content...

Implementors

Loading content...