Struct Iter
pub struct Iter<'a, K: 'a, V: 'a> { pub(in ::collections::hash::map) base: Iter<'a, K, V> }
An iterator over the entries of a HashMap.
This struct is created by the iter method on HashMap. See its
documentation for more.
Example
use std::collections::HashMap;
let map = HashMap::from([
("a", 1),
]);
let iter = map.iter();
Fields
base: Iter<'a, K, V>
Trait Implementations
impl<'a, K, V> Iterator for Iter<'a, K, V>
type Item = (&'a K, &'a V);fn next(&mut self) -> Option<(&'a K, &'a V)>fn size_hint(&self) -> (usize, Option<usize>)fn count(self) -> usizefn fold<B, F>(self, init: B, f: F) -> B where Self: Sized, F: FnMut(B, Self::Item) -> B,
impl<K, V> Clone for Iter<'_, K, V>
fn clone(&self) -> Self
impl<K, V> Default for Iter<'_, K, V>
fn default() -> Self
impl<K, V> ExactSizeIterator for Iter<'_, K, V>
fn len(&self) -> usize
impl<K, V> FusedIterator for Iter<'_, K, V>
impl<K: Debug, V: Debug> Debug for Iter<'_, K, V>
fn fmt(&self, f: &mut Formatter<'_>) -> Result