pub struct HashMapX<'a, K, V: 'a, S, SplitType>(/* private fields */)
where
K: Eq + Hash + 'a,
S: BuildHasher + 'a;
Expand description
A wrapper around a HashMap which provides access to the X portion of a Splittable24
value type
Implementations§
§impl<'a, K, V: 'a, S, SplitType> HashMapX<'a, K, V, S, SplitType>
impl<'a, K, V: 'a, S, SplitType> HashMapX<'a, K, V, S, SplitType>
pub fn iter<'b>(
&'b self,
) -> Map<Iter<'b, K, V>, fn((&'b K, &'b V)) -> (&'b K, <V as Splittable24<'b, SplitType>>::X)>where
V: Splittable24<'b, SplitType>,
pub fn iter<'b>(
&'b self,
) -> Map<Iter<'b, K, V>, fn((&'b K, &'b V)) -> (&'b K, <V as Splittable24<'b, SplitType>>::X)>where
V: Splittable24<'b, SplitType>,
An iterator visiting all key-value pairs in arbitrary order. Iterator element type is
(&'b K, &'b V::X)
.
pub fn iter_mut<'b>(
&'b mut self,
) -> Map<IterMut<'b, K, V>, fn((&'b K, &'b mut V)) -> (&'b K, <V as Splittable24<'b, SplitType>>::MutX)>where
V: Splittable24<'b, SplitType>,
pub fn iter_mut<'b>(
&'b mut self,
) -> Map<IterMut<'b, K, V>, fn((&'b K, &'b mut V)) -> (&'b K, <V as Splittable24<'b, SplitType>>::MutX)>where
V: Splittable24<'b, SplitType>,
An iterator visiting all key-value pairs in arbitrary order. Iterator element type is
(&'b K, &'b mut V::X)
.
pub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Returns the number of elements the map can hold without reallocating.
This number is a lower bound; the HashMap<K, V> might be able to hold more, but is guaranteed to be able to hold at least this many.
pub fn get<'b, Q>(
&'b self,
k: &Q,
) -> Option<<V as Splittable24<'b, SplitType>>::X>
pub fn get<'b, Q>( &'b self, k: &Q, ) -> Option<<V as Splittable24<'b, SplitType>>::X>
Returns a reference to the value corresponding to the key.
The key may be any borrowed form of the map’s key type, but Hash
and Eq
on the borrowed
form must match those for the key type.
pub fn get_mut<'b, Q>(
&'b mut self,
k: &Q,
) -> Option<<V as Splittable24<'b, SplitType>>::MutX>
pub fn get_mut<'b, Q>( &'b mut self, k: &Q, ) -> Option<<V as Splittable24<'b, SplitType>>::MutX>
Returns a mutable reference to the value corresponding to the key.
The key may be any borrowed form of the map’s key type, but Hash
and Eq
on the borrowed
form must match those for the key type.