http_types/headers/names.rs
1use std::collections::hash_map;
2use std::iter::Iterator;
3
4use crate::headers::{HeaderName, HeaderValues};
5
6/// Iterator over the headers.
7#[derive(Debug)]
8pub struct Names<'a> {
9 pub(super) inner: hash_map::Keys<'a, HeaderName, HeaderValues>,
10}
11
12impl<'a> Iterator for Names<'a> {
13 type Item = &'a HeaderName;
14
15 fn next(&mut self) -> Option<Self::Item> {
16 self.inner.next()
17 }
18}