pub struct DenseHashMap<K, V, H = DenseHashDefault<K>, E = DenseEqDefault<K>> { /* private fields */ }Implementations§
Source§impl<K, V, H, E> DenseHashMap<K, V, H, E>
impl<K, V, H, E> DenseHashMap<K, V, H, E>
pub fn try_insert_mut(&mut self, key: K, value: V) -> (&mut V, bool)
Source§impl<K, V, H, E> DenseHashMap<K, V, H, E>
impl<K, V, H, E> DenseHashMap<K, V, H, E>
Sourcepub fn new(empty_key: K) -> Self
pub fn new(empty_key: K) -> Self
DenseHashMap(empty_key, buckets = 0). Reference: DenseHash.h:570-573.
Sourcepub fn get_or_insert(&mut self, key: K) -> &mut V
pub fn get_or_insert(&mut self, key: K) -> &mut V
operator[] — inserts a default value when absent and returns a mutable
reference to the slot’s value. Reference: DenseHash.h:580-585.
Sourcepub fn find(&self, key: &K) -> Option<&V>
pub fn find(&self, key: &K) -> Option<&V>
const Value* find(const Key&) const. Reference: DenseHash.h:588-593.
Sourcepub fn get(&self, key: &K) -> Option<&V>
pub fn get(&self, key: &K) -> Option<&V>
std-style alias for generated Rust that spelled C++ find as get.
Sourcepub fn find_mut(&mut self, key: &K) -> Option<&mut V>
pub fn find_mut(&mut self, key: &K) -> Option<&mut V>
Value* find(const Key&). Reference: DenseHash.h:596-601.
Sourcepub fn get_mut(&mut self, key: &K) -> Option<&mut V>
pub fn get_mut(&mut self, key: &K) -> Option<&mut V>
std-style alias for generated Rust that spelled C++ find as get_mut.
Sourcepub fn contains_key(&self, key: &K) -> bool
pub fn contains_key(&self, key: &K) -> bool
contains. Reference: DenseHash.h:603-606.
std-style alias for contains — translations use HashMap idioms.
pub fn contains(&self, key: &K) -> bool
Sourcepub fn try_insert(&mut self, key: K, value: V) -> (&mut V, bool)
pub fn try_insert(&mut self, key: K, value: V) -> (&mut V, bool)
try_insert — returns (value_ref, fresh), where fresh is true only
when the key was newly inserted; an existing slot keeps its value.
Reference: DenseHash.h:608-638.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
std-style alias for translated code that calls C++ empty() as is_empty().