Struct collections::treemap::TreeMap[src]
pub struct TreeMap<K, V> {
// some fields omitted
}Methods
impl<K: Ord, V> TreeMap<K, V>
fn new() -> TreeMap<K, V>
Create an empty TreeMap
fn iter<'a>(&'a self) -> Entries<'a, K, V>
Get a lazy iterator over the key-value pairs in the map. Requires that it be frozen (immutable).
fn rev_iter<'a>(&'a self) -> RevEntries<'a, K, V>
Get a lazy reverse iterator over the key-value pairs in the map. Requires that it be frozen (immutable).
fn mut_iter<'a>(&'a mut self) -> MutEntries<'a, K, V>
Get a lazy forward iterator over the key-value pairs in the map, with the values being mutable.
fn mut_rev_iter<'a>(&'a mut self) -> RevMutEntries<'a, K, V>
Get a lazy reverse iterator over the key-value pairs in the map, with the values being mutable.
fn move_iter(self) -> MoveEntries<K, V>
Get a lazy iterator that consumes the treemap.
impl<K: Ord, V> TreeMap<K, V>
fn lower_bound<'a>(&'a self, k: &K) -> Entries<'a, K, V>
Return a lazy iterator to the first key-value pair whose key is not less than k
If all keys in map are less than k an empty iterator is returned.
fn upper_bound<'a>(&'a self, k: &K) -> Entries<'a, K, V>
Return a lazy iterator to the first key-value pair whose key is greater than k
If all keys in map are not greater than k an empty iterator is returned.
fn mut_lower_bound<'a>(&'a mut self, k: &K) -> MutEntries<'a, K, V>
Return a lazy value iterator to the first key-value pair (with
the value being mutable) whose key is not less than k.
If all keys in map are less than k an empty iterator is
returned.
fn mut_upper_bound<'a>(&'a mut self, k: &K) -> MutEntries<'a, K, V>
Return a lazy iterator to the first key-value pair (with the
value being mutable) whose key is greater than k.
If all keys in map are not greater than k an empty iterator
is returned.