Struct OccupiedEntry
pub struct OccupiedEntry<'a, T> { /* private fields */ }Expand description
A view into a single occupied location in a HeaderMap.
This struct is returned as part of the Entry enum.
Implementations§
§impl<'a, T> OccupiedEntry<'a, T>
 
impl<'a, T> OccupiedEntry<'a, T>
pub fn key(&self) -> &HeaderName
pub fn key(&self) -> &HeaderName
Returns a reference to the entry’s key.
§Examples
let mut map = HeaderMap::new();
map.insert(HOST, "world".parse().unwrap());
if let Entry::Occupied(e) = map.entry("host") {
    assert_eq!(