pub type PreHashMap<K, V> = HashMap<Hashed<K>, V, PassHash>;
Expand description
Aliased Type§
struct PreHashMap<K, V> { /* private fields */ }
Trait Implementations§
Source§impl<K: Hash + Eq + PartialEq + Clone, V> PreHashMapExt<K, V> for PreHashMap<K, V>
impl<K: Hash + Eq + PartialEq + Clone, V> PreHashMapExt<K, V> for PreHashMap<K, V>
Source§fn get_or_insert_with<F: FnOnce() -> V>(
&mut self,
key: &Hashed<K>,
func: F,
) -> &mut V
fn get_or_insert_with<F: FnOnce() -> V>( &mut self, key: &Hashed<K>, func: F, ) -> &mut V
Tries to get or insert the value for the given
key
using the pre-computed hash first.
If the PreHashMap
does not already contain the key
, it will clone it and insert
the value returned by func
.