Struct UHashMap
pub struct UHashMap<K, V, B>
{ /* private fields */ }
Implementations
impl<B, K, V> UHashMap<K, V, B>
pub fn with_hasher(_build_hasher: B) -> Self
where
B: BuildHasher
pub fn with_hasher_and_capacity(_build_hasher: B, capacity: u32) -> Self
where
B: BuildHasher
pub fn clear(&mut self)
Clears the map, removing all key-value entries.
pub fn contains_key(&mut self: &Self, key: K) -> bool
Returns true if the map contains a value for the specified key.
pub fn is_empty(&mut self: &Self) -> bool
Returns true if the map contains no elements.
pub fn entries(&mut self: &Self) -> [(K, V)]
Returns a vector of all valid entries in this UHashMap. The length of the returned vector will always match the length of this UHashMap.
pub fn keys(&mut self: &Self) -> [K]
Returns a vector containing all the keys within this UHashMap. The length of the returned vector will always match the length of this UHashMap.
pub fn values(&mut self: &Self) -> [V]
Returns a vector containing all the values within this UHashMap. The length of the returned vector will always match the length of this UHashMap.
pub unconstrained fn iter_mut(&mut self, f: fn(K, V) -> (K, V))
For each key-value entry applies mutator function.
pub unconstrained fn iter_keys_mut(&mut self, f: fn(K) -> K)
For each key applies mutator function.
pub fn iter_values_mut(&mut self, f: fn(V) -> V)
For each value applies mutator function.
pub fn retain(&mut self, f: fn(K, V) -> bool)
Retains only the elements specified by the predicate.
pub fn len(&mut self: &Self) -> u32
Amount of active key-value entries.
pub fn capacity(&mut self: &Self) -> u32
Get the current capacity of the inner table.
pub unconstrained fn get(&mut self: &Self, key: K) -> Option<V>
Get the value by key. If it does not exist, returns none().
pub unconstrained fn insert(&mut self, key: K, value: V)
Insert key-value entry. In case key was already present, value is overridden.
pub unconstrained fn remove(&mut self, key: K)
Removes a key-value entry. If key is not present, UHashMap remains unchanged.
Trait implementations
impl<B, K, V> Default for UHashMap<K, V, B>
where
B: BuildHasher,
B: Default
pub fn default() -> Self
impl<B, K, V> Eq for UHashMap<K, V, B>
pub fn eq(self, other: Self) -> bool
Creates a new instance of UHashMap with specified BuildHasher.