doc.rust-lang.org
pub struct Keys<'a, K, V>
An iterator over the keys of a BTreeMap.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct IterMut<'a, K, V>
A mutable iterator over the entries of a BTreeMap.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Iter<'a, K, V>
An iterator over the entries of a BTreeMap.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct IntoValues<K, V, A>
An owning iterator over the values of a BTreeMap.
struct
alloc
Stable since 1.54.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct IntoKeys<K, V, A>
An owning iterator over the keys of a BTreeMap.
struct
alloc
Stable since 1.54.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct IntoIter<K, V, A>
An owning iterator over the entries of a BTreeMap, sorted by key.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct ExtractIf<'a, K, V, R, F, A>
This struct is created by the extract_if method on BTreeMap.
struct
alloc
Stable since 1.91.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>
Gets a mutable iterator over the values of the map, in order by key.
method
alloc
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn values(&self) -> Values<'_, K, V>
Gets an iterator over the values of the map, in order by key.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn split_off<Q>(&mut self, key: &Q) -> Self
Splits the collection into two at the given key. Returns everything after the given key, including the key. If the key is not present, the split will occur at the nearest greater key, or return an empty map if no such key exists.
method
alloc
Stable since 1.11.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn retain<F>(&mut self, f: F)
Retains only the elements specified by the predicate.
method
alloc
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
Removes a key from the map, returning the stored key and value if the key was previously in the map.
method
alloc
Stable since 1.45.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn remove<Q>(&mut self, key: &Q) -> Option<V>
Removes a key from the map, returning the value at the key if the key was previously in the map.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn range_mut<T, R>(&mut self, range: R) -> RangeMut<'_, K, V>
Constructs a mutable double-ended iterator over a sub-range of elements in the map. The simplest way is to use the range syntax min..max, thus range(min..max) will yield elements from min (inclusive) to max (exclusive). The range may also be entered as (Bound<T>, Bound<T>), so for example range((Excluded(4), Included(10))) will yield a left-exclusive, right-inclusive range from 4 to 10.
method
alloc
Stable since 1.17.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn range<T, R>(&self, range: R) -> Range<'_, K, V>
Constructs a double-ended iterator over a sub-range of elements in the map. The simplest way is to use the range syntax min..max, thus range(min..max) will yield elements from min (inclusive) to max (exclusive). The range may also be entered as (Bound<T>, Bound<T>), so for example range((Excluded(4), Included(10))) will yield a left-exclusive, right-inclusive range from 4 to 10.
method
alloc
Stable since 1.17.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn pop_last(&mut self) -> Option<(K, V)>
Removes and returns the last element in the map. The key of this element is the maximum key that was in the map.
method
alloc
Stable since 1.66.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn pop_first(&mut self) -> Option<(K, V)>
Removes and returns the first element in the map. The key of this element is the minimum key that was in the map.
method
alloc
Stable since 1.66.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn new() -> BTreeMap<K, V>
Makes a new, empty BTreeMap.
associated_function
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn len(&self) -> usize
Returns the number of elements in the map.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn last_key_value(&self) -> Option<(&K, &V)>
Returns the last key-value pair in the map. The key in this pair is the maximum key in the map.
method
alloc
Stable since 1.66.0
Version 1.100.0-nightly