Struct Keys
pub struct Keys<'a, K: 'a, V: 'a> { pub(in ::collections::hash::map) inner: Iter<'a, K, V> }
An iterator over the keys of a HashMap.
This struct is created by the keys method on HashMap. See its
documentation for more.
Example
use std::collections::HashMap;
let map = HashMap::from([
("a", 1),
]);
let iter_keys = map.keys();
Fields
inner: Iter<'a, K, V>
Trait Implementations
impl<'a, K, V> Iterator for Keys<'a, K, V>
type Item = &'a K;fn next(&mut self) -> Option<&'a K>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 Keys<'_, K, V>
fn clone(&self) -> Self
impl<K, V> Default for Keys<'_, K, V>
fn default() -> Self
impl<K, V> ExactSizeIterator for Keys<'_, K, V>
fn len(&self) -> usize
impl<K, V> FusedIterator for Keys<'_, K, V>
impl<K: Debug, V> Debug for Keys<'_, K, V>
fn fmt(&self, f: &mut Formatter<'_>) -> Result