pub struct VacantEntry<'a>(/* private fields */);Expand description
A view into a vacant entry in particular Headers for a given HeaderName.
It is part of the Entry enum.
Implementations§
Source§impl<'a> VacantEntry<'a>
impl<'a> VacantEntry<'a>
Sourcepub fn name(&self) -> HeaderName<'_>
pub fn name(&self) -> HeaderName<'_>
Retrieves the HeaderName for this Entry.
Sourcepub fn insert(self, values: impl Into<HeaderValues>) -> &'a mut HeaderValues
pub fn insert(self, values: impl Into<HeaderValues>) -> &'a mut HeaderValues
Replace this VacantEntry with a value, returning a mutable reference to that value.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for VacantEntry<'a>
impl<'a> RefUnwindSafe for VacantEntry<'a>
impl<'a> Send for VacantEntry<'a>
impl<'a> Sync for VacantEntry<'a>
impl<'a> Unpin for VacantEntry<'a>
impl<'a> UnsafeUnpin for VacantEntry<'a>
impl<'a> !UnwindSafe for VacantEntry<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more