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) -> DenseHashMap<K, V, H, E>
pub fn new(empty_key: K) -> DenseHashMap<K, V, H, E>
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().
Trait Implementations§
Source§impl<K, V, H, E> Clone for DenseHashMap<K, V, H, E>
impl<K, V, H, E> Clone for DenseHashMap<K, V, H, E>
Source§fn clone(&self) -> DenseHashMap<K, V, H, E>
fn clone(&self) -> DenseHashMap<K, V, H, E>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<K, V, H, E> Debug for DenseHashMap<K, V, H, E>
impl<K, V, H, E> Debug for DenseHashMap<K, V, H, E>
Source§impl<T: WriteJson + DenseDefault> WriteJson for DenseHashMap<String, T>
write(JsonEmitter&, const std::unordered_map<std::string, T>&) for a
string-keyed DenseHashMap.
impl<T: WriteJson + DenseDefault> WriteJson for DenseHashMap<String, T>
write(JsonEmitter&, const std::unordered_map<std::string, T>&) for a
string-keyed DenseHashMap.
fn write_json(&self, emitter: &mut JsonEmitter)
Source§impl<K, V: WriteJson + DenseDefault> WriteJson for DenseHashMap<*const K, V>
Pointer-keyed DenseHashMap (e.g. unsolvedConstraints, typeStrings):
DcrLogger writes these through its own write overload, which keys the
object by each key’s pointer id.
impl<K, V: WriteJson + DenseDefault> WriteJson for DenseHashMap<*const K, V>
Pointer-keyed DenseHashMap (e.g. unsolvedConstraints, typeStrings):
DcrLogger writes these through its own write overload, which keys the
object by each key’s pointer id.