pub struct TreeMap<K, V> { priv root: std::option::Option, priv length: uint, }
impl<K: std::cmp::TotalOrd, V> TreeMap<K, V>
fn new() -> TreeMap<K, V>
Create an empty TreeMap
fn mutate_values(&mut self, f: &fn(&K, &mut V) -> bool) -> bool
Iterate over the map and mutate the contained values
fn iter<'a>(&'a self) -> TreeMapIterator<'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) -> TreeMapRevIterator<'a, K, V>
Get a lazy reverse iterator over the key-value pairs in the map. Requires that it be frozen (immutable).
fn lower_bound_iter<'a>(&'a self, k: &K) -> TreeMapIterator<'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_iter<'a>(&'a self, k: &K) -> TreeMapIterator<'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 move_iter(self) -> TreeMapMoveIterator<K, V>
Get a lazy iterator that consumes the treemap.
impl<K: std::clone::Clone, V: std::clone::Clone> std::clone::Clone for TreeMap<K, V>
fn clone(&self) -> TreeMap<K, V>
impl<K: std::cmp::Eq + std::cmp::TotalOrd, V: std::cmp::Eq> std::cmp::Eq for TreeMap<K, V>
fn eq(&self, other: &TreeMap<K, V>) -> bool
impl<K: std::cmp::Ord + std::cmp::TotalOrd, V: std::cmp::Ord> std::cmp::Ord for TreeMap<K, V>
fn lt(&self, other: &TreeMap<K, V>) -> bool
fn le(&self, other: &TreeMap<K, V>) -> bool
fn ge(&self, other: &TreeMap<K, V>) -> bool
fn gt(&self, other: &TreeMap<K, V>) -> bool
impl<K: std::cmp::TotalOrd, V> std::container::Container for TreeMap<K, V>
fn len(&self) -> uint
Return the number of elements in the map
fn is_empty(&self) -> bool
Return true if the map contains no elements
impl<K: std::cmp::TotalOrd, V> std::container::Mutable for TreeMap<K, V>
fn clear(&mut self)
Clear the map, removing all key-value pairs.
impl<K: std::cmp::TotalOrd, V> std::container::Map for TreeMap<K, V>
fn find<'a>(&'a self, key: &K) -> std::option::Option
Return a reference to the value corresponding to the key
impl<K: std::cmp::TotalOrd, V> std::container::MutableMap for TreeMap<K, V>
fn find_mut<'a>(&'a mut self, key: &K) -> std::option::Option
Return a mutable reference to the value corresponding to the key
fn swap(&mut self, key: K, value: V) -> std::option::Option
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: &K) -> std::option::Option
Removes a key from the map, returning the value at the key if the key was previously in the map.
impl<K: std::cmp::TotalOrd, V> std::iter::FromIterator for TreeMap<K, V>
fn from_iterator<T: std::iter::Iterator>(iter: &mut T) -> TreeMap<K, V>
impl<K: std::cmp::TotalOrd, V> std::iter::Extendable for TreeMap<K, V>
fn extend<T: std::iter::Iterator>(&mut self, iter: &mut T)
impl<A: ToJson> ToJson for TreeMap<~str, A>
fn to_json(&self) -> Json
Converts the value of self
to an instance of JSON
impl<E: Encoder, K: Encodable<E> + std::cmp::Eq + std::cmp::TotalOrd, V: Encodable<E> + std::cmp::Eq> Encodable<E> for TreeMap<K, V>
fn encode(&self, e: &mut E)
impl<D: Decoder, K: Decodable<D> + std::cmp::Eq + std::cmp::TotalOrd, V: Decodable<D> + std::cmp::Eq> Decodable<D> for TreeMap<K, V>
fn decode(d: &mut D) -> TreeMap<K, V>
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
).