doc.rust-lang.org
pub fn insert(self, value: V) -> &'a mut V
Sets the value of the entry with the VacantEntry's key, and returns a mutable reference to it.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct VacantEntry<'a, K, V, A>
A view into a vacant entry in a HashMap. It is part of the Entry enum.
struct
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn remove_entry(self) -> (K, V)
Take the ownership of the key and value from the map.
method
std
Stable since 1.12.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn remove(self) -> V
Takes the value out of the entry, and returns it.
method
std
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
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn into_mut(self) -> &'a mut V
Converts the OccupiedEntry into a mutable reference to the value in the entry with a lifetime bound to the map itself.
method
std
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, and returns the entry's old value.
method
std
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
std
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
std
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 HashMap. It is part of the Entry enum.
struct
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Keys<'a, K, V>
An iterator over the keys of a HashMap.
struct
std
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 HashMap.
struct
std
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 HashMap.
struct
std
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 HashMap.
struct
std
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 HashMap.
struct
std
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 HashMap.
struct
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn with_hasher(hash_builder: S) -> HashMap<K, V, S>
Creates an empty HashMap which will use the given hash builder to hash keys.
associated_function
std
Stable since 1.7.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> HashMap<K, V, S>
Creates an empty HashMap with at least the specified capacity, using hasher to hash the keys.
associated_function
std
Stable since 1.7.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn with_capacity(capacity: usize) -> HashMap<K, V, RandomState>
Creates an empty HashMap with at least the specified capacity.
associated_function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>
An iterator visiting all values mutably in arbitrary order. The iterator element type is &'a mut V.
method
std
Stable since 1.10.0
Version 1.100.0-nightly