[−][src]Trait rs_graph::collections::ItemMap
A (finite) map of items (node or edges) of a graph to some value.
Required methods
fn len(&self) -> usize
Return the number of items in this map.
fn clear(&mut self)
Remove all items from the map.
fn insert(&mut self, key: K, value: V) -> bool
Add one item to the map.
Return true
iff u
had not been contained in this map before. In this
case the value is not updated.
fn insert_or_replace(&mut self, key: K, value: V) -> bool
Add one item to the map.
Return true
iff key
had not been contained in this map before. In this
case the value is updated.
fn remove(&mut self, key: K) -> bool
Remove one item from the map.
Returns true
if the item had been contained in the map, otherwise
false.
fn get(&self, key: K) -> Option<&V>
Return a read-only reference to the element with the given key.
fn get_mut(&mut self, key: K) -> Option<&mut V>
Return a mutable reference to the element with the given key.
fn contains(&self, key: K) -> bool
Return true
iff item u
is contained in this map.
Provided methods
Loading content...Implementations on Foreign Types
impl<'a, K, V, S> ItemMap<K, V> for &'a mut S where
K: Copy,
S: ItemMap<K, V>,
[src]
K: Copy,
S: ItemMap<K, V>,
fn is_empty(&self) -> bool
[src]
fn len(&self) -> usize
[src]
fn clear(&mut self)
[src]
fn insert(&mut self, key: K, value: V) -> bool
[src]
fn insert_or_replace(&mut self, key: K, value: V) -> bool
[src]
fn remove(&mut self, key: K) -> bool
[src]
fn get(&self, key: K) -> Option<&V>
[src]
fn get_mut(&mut self, key: K) -> Option<&mut V>
[src]
fn contains(&self, key: K) -> bool
[src]
impl<K, V, S> ItemMap<K, V> for HashMap<K, V, S> where
K: Copy + Eq + Hash,
S: BuildHasher,
[src]
K: Copy + Eq + Hash,
S: BuildHasher,
fn is_empty(&self) -> bool
[src]
fn len(&self) -> usize
[src]
fn clear(&mut self)
[src]
fn insert(&mut self, key: K, value: V) -> bool
[src]
fn insert_or_replace(&mut self, key: K, value: V) -> bool
[src]
fn remove(&mut self, key: K) -> bool
[src]
fn get(&self, key: K) -> Option<&V>
[src]
fn get_mut(&mut self, key: K) -> Option<&mut V>
[src]
fn contains(&self, key: K) -> bool
[src]
Implementors
impl<'a, I, V> ItemMap<<I as Indexer>::Idx, V> for ItemVecMap<'a, I, V> where
I: Indexer,
I::Idx: Copy,
[src]
I: Indexer,
I::Idx: Copy,