pub struct Headers { /* private fields */ }Implementations§
Source§impl Headers
impl Headers
pub fn new() -> Headers
pub fn get(&self, name: &str) -> Option<&[u8]>
pub fn get_all<'headers>( &'headers self, name: &'headers str, ) -> impl Iterator<Item = &'headers [u8]> + 'headers
pub fn contains(&self, name: &str) -> bool
pub fn iter(&self) -> impl Iterator<Item = (&str, &[u8])>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn set( &mut self, name: impl Into<String>, value: impl Into<Vec<u8>>, ) -> Result<(), InvalidHeader>
pub fn append( &mut self, name: impl Into<String>, value: impl Into<Vec<u8>>, ) -> Result<(), InvalidHeader>
pub fn remove(&mut self, name: &str)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Headers
impl RefUnwindSafe for Headers
impl Send for Headers
impl Sync for Headers
impl Unpin for Headers
impl UnsafeUnpin 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