pub trait ReadableHashMapExt<K, V, H>: Readable<Target = HashMap<K, V, H>>where
K: 'static,
V: 'static,
H: 'static,{
// Provided methods
fn is_empty(&self) -> bool { ... }
fn len(&self) -> usize { ... }
fn capacity(&self) -> usize { ... }
fn get(&self, key: &K) -> Option<<Self::Storage as AnyStorage>::Ref<'_, V>>
where K: Hash + Eq,
H: BuildHasher { ... }
fn contains_key(&self, key: &K) -> bool
where K: Hash + Eq,
H: BuildHasher { ... }
}Available on crate feature
prelude only.Expand description
An extension trait for Readable<HashMap<K, V, H>> that provides some convenience methods.
Provided Methods§
Sourcefn get(&self, key: &K) -> Option<<Self::Storage as AnyStorage>::Ref<'_, V>>
fn get(&self, key: &K) -> Option<<Self::Storage as AnyStorage>::Ref<'_, V>>
Get the value for the given key.
Sourcefn contains_key(&self, key: &K) -> bool
fn contains_key(&self, key: &K) -> bool
Check if the hashmap contains the given key.