Trait collection::MapOps
[−]
[src]
pub trait MapOps<K, V, M> where Self: Sized, M: Meta<KV<K, V>>, K: Val + Ord, V: Clone {
fn insert(&mut self, key: K, V);
fn remove(&mut self, key: K) -> Option<V>;
fn get(&self, key: K) -> Option<&V>;
fn get_mut(&mut self, key: K) -> Option<ValContext<KV<K, V>, M, Beginning>>;
}
Map operations on a Collection
Required Methods
fn insert(&mut self, key: K, V)
Insert a value V
at key K
fn remove(&mut self, key: K) -> Option<V>
Remove value at key K
fn get(&self, key: K) -> Option<&V>
Get a reference to the value at key K
fn get_mut(&mut self, key: K) -> Option<ValContext<KV<K, V>, M, Beginning>>
Get a mutable reference to the value at key K