std::collections::hash_map
The entries of std::collections::hash_map in the Rust reference. This page has 77 cards.
pub struct DefaultHasher(/* private fields */)
- Kind
- struct
- Module
std::collections::hash_map- Since
- 1.7.0
pub fn new() -> DefaultHasher
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.13.0
pub struct Drain<'a, K: 'a, V: 'a, A: Allocator = Global>
- Kind
- struct
- Module
std::collections::hash_map- Since
- 1.6.0
pub enum Entry<'a, K: 'a, V: 'a, A: Allocator = Global>
- Kind
- enum
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn and_modify<F>(self, f: F) -> Self where F: FnOnce(&mut V)
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.26.0
pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V, A>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.83.0
pub fn key(&self) -> &K
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.10.0
pub fn or_default(self) -> &'a mut V
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.28.0
pub fn or_insert(self, default: V) -> &'a mut V
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn or_insert_with<F: FnOnce() -> V>(self, default: F) -> &'a mut V
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn or_insert_with_key<F: FnOnce(&K) -> V>(self, default: F) -> &'a mut V
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.50.0
pub fn or_try_insert_with<F: FnOnce() -> Result<V, E>, E>( self, default: F, ) -> Result<&'a mut V, E>
- Kind
- method
- Module
std::collections::hash_map
pub fn or_try_insert_with_key<F: FnOnce(&K) -> Result<V, E>, E>( self, default: F, ) -> Result<&'a mut V, E>
- Kind
- method
- Module
std::collections::hash_map
pub struct HashMap<K, V, S = RandomState, A: Allocator = Global>
- Kind
- struct
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn capacity(&self) -> usize
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn clear(&mut self)
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn contains_key<Q>(&self, k: &Q) -> bool where K: Borrow<Q>, Q: Hash + Eq + ?Sized
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn drain(&mut self) -> Drain<'_, K, V, A>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.6.0
pub fn entry(&mut self, key: K) -> Entry<'_, K, V, A>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn get<Q>(&self, k: &Q) -> Option<&V> where K: Borrow<Q>, Q: Hash + Eq + ?Sized
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn get_disjoint_mut<Q, const N: usize>( &mut self, ks: [&Q; N], ) -> [Option<&mut V>; N] where K: Borrow<Q>, Q: Hash + Eq + ?Sized
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.86.0
pub unsafe fn get_disjoint_unchecked_mut<Q, const N: usize>( &mut self, ks: [&Q; N], ) -> [Option<&mut V>; N] where K: Borrow<Q>, Q: Hash + Eq + ?Sized
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.86.0
pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)> where K: Borrow<Q>, Q: Hash + Eq + ?Sized
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.40.0
pub fn get_mut<Q>(&mut self, k: &Q) -> Option<&mut V> where K: Borrow<Q>, Q: Hash + Eq + ?Sized
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn hasher(&self) -> &S
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.9.0
pub fn insert(&mut self, k: K, v: V) -> Option<V>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn into_keys(self) -> IntoKeys<K, V, A>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.54.0
pub fn into_values(self) -> IntoValues<K, V, A>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.54.0
pub fn is_empty(&self) -> bool
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn iter(&self) -> Iter<'_, K, V>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn iter_mut(&mut self) -> IterMut<'_, K, V>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn keys(&self) -> Keys<'_, K, V>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn len(&self) -> usize
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn new() -> HashMap<K, V, RandomState>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn new_in(alloc: A) -> Self
- Kind
- method
- Module
std::collections::hash_map
pub fn remove<Q>(&mut self, k: &Q) -> Option<V> where K: Borrow<Q>, Q: Hash + Eq + ?Sized
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn remove_entry<Q>(&mut self, k: &Q) -> Option<(K, V)> where K: Borrow<Q>, Q: Hash + Eq + ?Sized
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.27.0
pub fn reserve(&mut self, additional: usize)
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn retain<F>(&mut self, f: F) where F: FnMut(&K, &mut V) -> bool
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.18.0
pub fn shrink_to(&mut self, min_capacity: usize)
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.56.0
pub fn shrink_to_fit(&mut self)
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn try_insert( &mut self, key: K, value: V, ) -> Result<&mut V, OccupiedError<'_, K, V, A>>
- Kind
- method
- Module
std::collections::hash_map
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.57.0
pub fn values(&self) -> Values<'_, K, V>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.10.0
pub fn with_capacity(capacity: usize) -> HashMap<K, V, RandomState>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> HashMap<K, V, S>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.7.0
pub fn with_capacity_and_hasher_in( capacity: usize, hash_builder: S, alloc: A, ) -> Self
- Kind
- method
- Module
std::collections::hash_map
pub fn with_capacity_in(capacity: usize, alloc: A) -> Self
- Kind
- method
- Module
std::collections::hash_map
pub const fn with_hasher(hash_builder: S) -> HashMap<K, V, S>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.7.0
pub fn with_hasher_in(hash_builder: S, alloc: A) -> Self
- Kind
- method
- Module
std::collections::hash_map
pub struct IntoIter<K, V, A: Allocator = Global>
- Kind
- struct
- Module
std::collections::hash_map- Since
- 1.0.0
pub struct IntoKeys<K, V, A: Allocator = Global>
- Kind
- struct
- Module
std::collections::hash_map- Since
- 1.54.0
pub struct IntoValues<K, V, A: Allocator = Global>
- Kind
- struct
- Module
std::collections::hash_map- Since
- 1.54.0
pub struct Iter<'a, K: 'a, V: 'a>
- Kind
- struct
- Module
std::collections::hash_map- Since
- 1.0.0
pub struct IterMut<'a, K: 'a, V: 'a>
- Kind
- struct
- Module
std::collections::hash_map- Since
- 1.0.0
pub struct Keys<'a, K: 'a, V: 'a>
- Kind
- struct
- Module
std::collections::hash_map- Since
- 1.0.0
pub struct OccupiedEntry<'a, K: 'a, V: 'a, A: Allocator = Global>
- Kind
- struct
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn get(&self) -> &V
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn get_mut(&mut self) -> &mut V
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn insert(&mut self, value: V) -> V
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn into_mut(self) -> &'a mut V
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn key(&self) -> &K
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.10.0
pub fn remove(self) -> V
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn remove_entry(self) -> (K, V)
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.12.0
#[non_exhaustive]pub struct OccupiedError<'a, K: 'a, V: 'a, A: Allocator = Global>
- Kind
- struct
- Module
std::collections::hash_map
pub struct RandomState
- Kind
- struct
- Module
std::collections::hash_map- Since
- 1.7.0
pub fn new() -> RandomState
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.7.0
pub struct VacantEntry<'a, K: 'a, V: 'a, A: Allocator = Global>
- Kind
- struct
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn insert(self, value: V) -> &'a mut V
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.0.0
pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V, A>
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.83.0
pub fn into_key(self) -> K
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.12.0
pub fn key(&self) -> &K
- Kind
- method
- Module
std::collections::hash_map- Since
- 1.10.0
pub struct Values<'a, K: 'a, V: 'a>
- Kind
- struct
- Module
std::collections::hash_map- Since
- 1.0.0
pub struct ValuesMut<'a, K: 'a, V: 'a>
- Kind
- struct
- Module
std::collections::hash_map- Since
- 1.10.0