Struct std::collections::trie::TrieMap[src]
pub struct TrieMap<T> {
// some fields omitted
}Methods
impl<T> TrieMap<T>
fn new<T>() -> TrieMap<T>
Create an empty TrieMap
fn each_reverse<T>(&'a self, f: |&uint, &'a T| -> bool) -> bool
Visit all key-value pairs in reverse order
fn iter<T>(&'a self) -> Entries<'a, T>
Get an iterator over the key-value pairs in the map
fn mut_iter<T>(&'a mut self) -> MutEntries<'a, T>
Get an iterator over the key-value pairs in the map, with the ability to mutate the values.
impl<T> TrieMap<T>
fn lower_bound<T>(&'a self, key: uint) -> Entries<'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<T>(&'a self, key: uint) -> Entries<'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.
fn mut_lower_bound<T>(&'a mut self, key: uint) -> MutEntries<'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 mut_upper_bound<T>(&'a mut self, key: uint) -> MutEntries<'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.
Trait Implementations
impl<T> Collection for TrieMap<T>
impl<T> Mutable for TrieMap<T>
fn clear<T>(&mut self)
Clear the map, removing all values.
impl<T> Map<uint, T> for TrieMap<T>
fn find<T>(&'a self, key: &uint) -> Option<&'a T>
Return a reference to the value corresponding to the key
fn contains_key<T>(&self, &uint) -> bool
impl<T> MutableMap<uint, T> for TrieMap<T>
fn find_mut<T>(&'a mut self, key: &uint) -> Option<&'a mut T>
Return a mutable reference to the value corresponding to the key
fn swap<T>(&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<T>(&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.