pub struct TrieMap<T> { priv root: TrieNode<T>, priv length: uint, }
impl<T> TrieMap<T>
fn new() -> TrieMap<T>
Create an empty TrieMap
fn each_reverse<'a>(&'a self, f: &fn(&uint, &'a T) -> bool) -> bool
Visit all key-value pairs in reverse order
fn each<'a>(&'a self, f: &fn(&uint, &'a T) -> bool) -> bool
Visit all key-value pairs in order
fn each_key(&self, f: &fn(&uint) -> bool) -> bool
Visit all keys in order
fn each_value<'a>(&'a self, f: &fn(&'a T) -> bool) -> bool
Visit all values in order
fn mutate_values(&mut self, f: &fn(&uint, &mut T) -> bool) -> bool
Iterate over the map and mutate the contained values
fn each_key_reverse(&self, f: &fn(&uint) -> bool) -> bool
Visit all keys in reverse order
fn each_value_reverse(&self, f: &fn(&T) -> bool) -> bool
Visit all values in reverse order
fn iter<'a>(&'a self) -> TrieMapIterator<'a, T>
Get an iterator over the key-value pairs in the map
fn lower_bound_iter<'a>(&'a self, key: uint) -> TrieMapIterator<'a, T>
Get an iterator pointing to the first key-value pair whose key is not less than key
.
If all keys in the map are less than key
an empty iterator is returned.
fn upper_bound_iter<'a>(&'a self, key: uint) -> TrieMapIterator<'a, T>
Get an iterator pointing to the first key-value pair whose key is greater than key
.
If all keys in the map are not greater than key
an empty iterator is returned.
impl<T> Container for TrieMap<T>
fn len(&self) -> uint
Return the number of elements in the map
impl<T> Mutable for TrieMap<T>
fn clear(&mut self)
Clear the map, removing all values.
impl<T> Map<uint, T> for TrieMap<T>
fn find<'a>(&'a self, key: &uint) -> Option<&'a T>
Return a reference to the value corresponding to the key
impl<T> MutableMap<uint, T> for TrieMap<T>
fn find_mut<'a>(&'a mut self, key: &uint) -> Option<&'a mut T>
Return a mutable reference to the value corresponding to the key
fn swap(&mut self, key: uint, value: T) -> Option<T>
Insert a key-value pair from the map. If the key already had a value present in the map, that value is returned. Otherwise None is returned.
fn pop(&mut self, key: &uint) -> Option<T>
Removes a key from the map, returning the value at the key if the key was previously in the map.
impl<T> FromIterator<(uint, T)> for TrieMap<T>
fn from_iterator<Iter: Iterator<(uint, T)>>(iter: &mut Iter) -> TrieMap<T>
Build a container with elements from an external iterator.
impl<T> Extendable<(uint, T)> for TrieMap<T>
fn extend<Iter: Iterator<(uint, T)>>(&mut self, iter: &mut Iter)
Extend a container with the elements yielded by an iterator
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).