Struct map_split::HashMapQ
[−]
[src]
pub struct HashMapQ<'a, K: 'a, V: 'a, S: 'a, SplitType>(_, _)
where
K: Eq + Hash,
S: BuildHasher;
A wrapper around a HashMap which provides access to the Q portion of a Splittable17
value type
Methods
impl<'a, K: 'a, V: 'a, S, SplitType> HashMapQ<'a, K, V, S, SplitType> where
K: Eq + Hash,
S: BuildHasher,
[src]
K: Eq + Hash,
S: BuildHasher,
fn iter<'b>(
&'b self
) -> Map<Iter<'b, K, V>, fn(_: (&'b K, &'b V)) -> (&'b K, <V as Splittable17<'b, SplitType>>::Q)> where
V: Splittable17<'b, SplitType>,
&'b self
) -> Map<Iter<'b, K, V>, fn(_: (&'b K, &'b V)) -> (&'b K, <V as Splittable17<'b, SplitType>>::Q)> where
V: Splittable17<'b, SplitType>,
An iterator visiting all key-value pairs in arbitrary order. Iterator element type is
(&'b K, &'b V::Q)
.
fn iter_mut<'b>(
&'b mut self
) -> Map<IterMut<'b, K, V>, fn(_: (&'b K, &'b mut V)) -> (&'b K, <V as Splittable17<'b, SplitType>>::MutQ)> where
V: Splittable17<'b, SplitType>,
&'b mut self
) -> Map<IterMut<'b, K, V>, fn(_: (&'b K, &'b mut V)) -> (&'b K, <V as Splittable17<'b, SplitType>>::MutQ)> where
V: Splittable17<'b, SplitType>,
An iterator visiting all key-value pairs in arbitrary order. Iterator element type is
(&'b K, &'b mut V::Q)
.
fn capacity(&self) -> usize
Returns the number of elements the map can hold without reallocating.
This number is a lower bound; the HashMap
fn len(&self) -> usize
Returns the number of elements in the map.
fn is_empty(&self) -> bool
Returns true if the map contains no elements.
fn get<'b, Q: ?Sized>(
&'b self,
k: &Q
) -> Option<<V as Splittable17<'b, SplitType>>::Q> where
Q: Hash + Eq,
K: Borrow<Q>,
V: Splittable17<'b, SplitType>,
&'b self,
k: &Q
) -> Option<<V as Splittable17<'b, SplitType>>::Q> where
Q: Hash + Eq,
K: Borrow<Q>,
V: Splittable17<'b, SplitType>,
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.
fn get_mut<'b, Q: ?Sized>(
&'b mut self,
k: &Q
) -> Option<<V as Splittable17<'b, SplitType>>::MutQ> where
Q: Hash + Eq,
K: Borrow<Q>,
V: Splittable17<'b, SplitType>,
&'b mut self,
k: &Q
) -> Option<<V as Splittable17<'b, SplitType>>::MutQ> where
Q: Hash + Eq,
K: Borrow<Q>,
V: Splittable17<'b, SplitType>,
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.