doc.rust-lang.org
pub fn remove_entry(self) -> (K, V)
Take ownership of the key and value from the map.
method
alloc
Stable since 1.12.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn remove(self) -> V
Takes the value of the entry out of the map, and returns it.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn key(&self) -> &K
Gets a reference to the key in the entry.
method
alloc
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn into_mut(self) -> &'a mut V
Converts the entry into a mutable reference to its value.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn insert(&mut self, value: V) -> V
Sets the value of the entry with the OccupiedEntry's key, and returns the entry's old value.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn get_mut(&mut self) -> &mut V
Gets a mutable reference to the value in the entry.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn get(&self) -> &V
Gets a reference to the value in the entry.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct OccupiedEntry<'a, K, V, A>
A view into an occupied entry in a BTreeMap. It is part of the Entry enum.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn or_insert_with_key<F>(self, default: F) -> &'a mut V
Ensures a value is in the entry by inserting, if empty, the result of the default function.
method
alloc
Stable since 1.50.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn or_insert_with<F>(self, default: F) -> &'a mut V
Ensures a value is in the entry by inserting the result of the default function if empty, and returns a mutable reference to the value in the entry.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn or_insert(self, default: V) -> &'a mut V
Ensures a value is in the entry by inserting the default if empty, and returns a mutable reference to the value in the entry.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn or_default(self) -> &'a mut V
Ensures a value is in the entry by inserting the default value if empty, and returns a mutable reference to the value in the entry.
method
alloc
Stable since 1.28.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn key(&self) -> &K
Returns a reference to this entry's key.
method
alloc
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V, A>
Sets the value of the entry, and returns an OccupiedEntry.
method
alloc
Stable since 1.92.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn and_modify<F>(self, f: F) -> Self
Provides in-place mutable access to an occupied entry before any potential inserts into the map.
method
alloc
Stable since 1.26.0
Version 1.100.0-nightly
doc.rust-lang.org
pub enum Entry<'a, K, V, A>
A view into a single entry in a map, which may either be vacant or occupied.
enum
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct ValuesMut<'a, K, V>
A mutable iterator over the values of a BTreeMap.
struct
alloc
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Values<'a, K, V>
An iterator over the values of a BTreeMap.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct RangeMut<'a, K, V>
A mutable iterator over a sub-range of entries in a BTreeMap.
struct
alloc
Stable since 1.17.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Range<'a, K, V>
An iterator over a sub-range of entries in a BTreeMap.
struct
alloc
Stable since 1.17.0
Version 1.100.0-nightly