pub struct Headers { /* private fields */ }
Implementations§
source§impl Headers
impl Headers
pub fn new() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, key: impl AsHeaderName) -> Option<&HeaderValue>
pub fn get_all(&self, key: impl AsHeaderName) -> GetAll<'_> ⓘ
pub fn get_mut(&mut self, key: impl AsHeaderName) -> Option<&mut HeaderValue>
pub fn contains_key(&self, key: impl AsHeaderName) -> bool
pub fn insert( &mut self, key: HeaderName, value: impl Into<HeaderValue>, ) -> Option<HeaderValue>
pub fn append(&mut self, key: HeaderName, value: impl Into<HeaderValue>) -> bool
pub fn remove(&mut self, key: impl AsHeaderName) -> Option<HeaderValue>
pub fn clear(&mut self)
pub fn keys(&self) -> Keys<'_> ⓘ
pub fn iter(&self) -> Iter<'_> ⓘ
Trait Implementations§
source§impl<'a> Extend<(&'a HeaderName, &'a HeaderValue)> for Headers
impl<'a> Extend<(&'a HeaderName, &'a HeaderValue)> for Headers
source§fn extend<T: IntoIterator<Item = (&'a HeaderName, &'a HeaderValue)>>(
&mut self,
iter: T,
)
fn extend<T: IntoIterator<Item = (&'a HeaderName, &'a HeaderValue)>>( &mut self, iter: T, )
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl<'a> Extend<(&'a HeaderName, Iter<'a, HeaderValue>)> for Headers
impl<'a> Extend<(&'a HeaderName, Iter<'a, HeaderValue>)> for Headers
source§fn extend<T: IntoIterator<Item = (&'a HeaderName, Iter<'a, HeaderValue>)>>(
&mut self,
iter: T,
)
fn extend<T: IntoIterator<Item = (&'a HeaderName, Iter<'a, HeaderValue>)>>( &mut self, iter: T, )
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl Extend<(HeaderName, HeaderValue)> for Headers
impl Extend<(HeaderName, HeaderValue)> for Headers
source§fn extend<T: IntoIterator<Item = (HeaderName, HeaderValue)>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = (HeaderName, HeaderValue)>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl Extend<(HeaderName, IntoIter<HeaderValue>)> for Headers
impl Extend<(HeaderName, IntoIter<HeaderValue>)> for Headers
source§fn extend<T: IntoIterator<Item = (HeaderName, IntoIter<HeaderValue>)>>(
&mut self,
iter: T,
)
fn extend<T: IntoIterator<Item = (HeaderName, IntoIter<HeaderValue>)>>( &mut self, iter: T, )
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl<'a> IntoIterator for &'a Headers
impl<'a> IntoIterator for &'a Headers
source§impl IntoIterator for Headers
impl IntoIterator for Headers
Auto Trait Implementations§
impl Freeze for Headers
impl RefUnwindSafe for Headers
impl Send for Headers
impl Sync for Headers
impl Unpin for Headers
impl UnwindSafe for Headers
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)