pub struct SmallIntMap<T> { priv v: ~[std::option::Option], }
impl<V> SmallIntMap<V>
fn new() -> SmallIntMap<V>
Create an empty SmallIntMap
fn get<'a>(&'a self, key: &uint) -> &'a V
fn iter<'r>(&'r self) -> SmallIntMapIterator<'r, V>
An iterator visiting all key-value pairs in ascending order by the keys. Iterator element type is (uint, &'r V)
fn mut_iter<'r>(&'r mut self) -> SmallIntMapMutIterator<'r, V>
An iterator visiting all key-value pairs in ascending order by the keys, with mutable references to the values Iterator element type is (uint, &'r mut V)
fn rev_iter<'r>(&'r self) -> SmallIntMapRevIterator<'r, V>
An iterator visiting all key-value pairs in descending order by the keys. Iterator element type is (uint, &'r V)
fn mut_rev_iter<'r>(&'r mut self) -> SmallIntMapMutRevIterator<'r, V>
An iterator visiting all key-value pairs in descending order by the keys, with mutable references to the values Iterator element type is (uint, &'r mut V)
fn move_iter(&mut self) -> std::iter::FilterMap
Empties the hash map, moving all values into the specified closure
impl<V: std::clone::Clone> SmallIntMap<V>
fn update_with_key(&mut self, key: uint, val: V, ff: &fn(uint, V, V) -> V) -> bool
fn update(&mut self, key: uint, newval: V, ff: &fn(V, V) -> V) -> bool
impl<V> std::container::Container for SmallIntMap<V>
fn len(&self) -> uint
Return the number of elements in the map
fn is_empty(&self) -> bool
Return true if there are no elements in the map
impl<V> std::container::Mutable for SmallIntMap<V>
fn clear(&mut self)
Clear the map, removing all key-value pairs.
impl<V> std::container::Map for SmallIntMap<V>
fn find<'a>(&'a self, key: &uint) -> std::option::Option
Return a reference to the value corresponding to the key
impl<V> std::container::MutableMap for SmallIntMap<V>
fn find_mut<'a>(&'a mut self, key: &uint) -> std::option::Option
Return a mutable reference to the value corresponding to the key
fn insert(&mut self, key: uint, value: V) -> bool
Insert a key-value pair into the map. An existing value for a key is replaced by the new value. Return true if the key did not already exist in the map.
fn remove(&mut self, key: &uint) -> bool
Remove a key-value pair from the map. Return true if the key was present in the map, otherwise false.
fn swap(&mut self, key: uint, 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: &uint) -> std::option::Option
Removes a key from the map, returning the value at the key if the key was previously in the map.
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
).