Enum tinyset::tinymap::TinyMap
[−]
[src]
pub enum TinyMap<K: Hash + Eq, T> { Sm(Vec<(K, T)>), V(FnvHashMap<K, T>), }
Small set?
Variants
Sm(Vec<(K, T)>)
should be private
V(FnvHashMap<K, T>)
should be private
Methods
impl<K: Hash + Eq, T> TinyMap<K, T>
[src]
fn new() -> TinyMap<K, T>
new
fn len(&self) -> usize
len
fn insert(&mut self, k: K, elem: T) -> Option<T>
insert
fn remove<Q: ?Sized>(&mut self, k: &Q) -> Option<T> where
K: Borrow<Q>,
Q: Hash + Eq,
K: Borrow<Q>,
Q: Hash + Eq,
has key
fn contains_key<Q: ?Sized>(&self, k: &Q) -> bool where
K: Borrow<Q>,
Q: Hash + Eq,
K: Borrow<Q>,
Q: Hash + Eq,
has key
fn get<Q: ?Sized>(&self, k: &Q) -> Option<&T> where
K: Borrow<Q>,
Q: Hash + Eq,
K: Borrow<Q>,
Q: Hash + Eq,
get
fn get_mut<Q: ?Sized>(&mut self, k: &Q) -> Option<&mut T> where
K: Borrow<Q>,
Q: Hash + Eq,
K: Borrow<Q>,
Q: Hash + Eq,
get
fn iter<'a>(&'a self) -> Box<Iterator<Item = (&'a K, &'a T)> + 'a>
return iterator over key/value pairs
fn keys<'a>(&'a self) -> Box<Iterator<Item = &'a K> + 'a>
return iterator over keys
fn values<'a>(&'a self) -> Box<Iterator<Item = &'a T> + 'a>
return iterator over values
fn values_mut<'a>(&'a mut self) -> Box<Iterator<Item = &'a mut T> + 'a>
return iterator over mutable values
Trait Implementations
impl<K: Debug + Hash + Eq, T: Debug> Debug for TinyMap<K, T>
[src]
impl<K: Clone + Hash + Eq, T: Clone> Clone for TinyMap<K, T>
[src]
fn clone(&self) -> TinyMap<K, T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more