pub struct Headers<'a> { /* private fields */ }Implementations§
Source§impl<'a> Headers<'a>
impl<'a> Headers<'a>
pub const CONTENT_LENGTH: &'static str = "content-length"
pub const CONTENT_TYPE: &'static str = "content-type"
pub const TRANSFER_ENCODING: &'static str = "transfer-encoding"
pub const CONNECTION: &'static str = "connection"
pub fn empty() -> &'static Headers<'static>
pub fn empty_nodate() -> &'static Headers<'static>
pub fn new() -> Self
pub fn new_nodate() -> Self
pub fn iter(&self) -> Iter<'_, (Cow<'a, str>, Cow<'a, [u8]>)>
pub fn iter_mut(&mut self) -> IterMut<'_, (Cow<'a, str>, Cow<'a, [u8]>)>
pub fn get_count(&self) -> usize
pub fn add<N, V>(&mut self, name: N, value: V)
pub fn get(&self, name: &str) -> Option<&[u8]>
pub fn get_all<'s>( &'s self, name: &'s str, ) -> impl Iterator<Item = &'s (Cow<'a, str>, Cow<'a, [u8]>)>
pub fn replace<N, V>(&mut self, name: N, value: V)
pub fn remove(&mut self, name: &str)
pub fn get_content_length(&self) -> Option<u64>
pub fn set_content_length(&mut self, len: Option<u64>)
pub fn set_transfer_encoding_chunked(&mut self)
pub fn is_transfer_encoding_chunked(&self) -> bool
Sourcepub fn get_transfer_encoding(&self) -> Vec<Vec<u8>>
pub fn get_transfer_encoding(&self) -> Vec<Vec<u8>>
Returns all transfer-encoding tokens (comma-split, trimmed)
pub fn is_with_date_header(&self) -> bool
pub fn set_connection_close(&mut self)
pub fn is_connection_close(&self) -> bool
Sourcepub fn get_connection_values(&self) -> Vec<Vec<u8>>
pub fn get_connection_values(&self) -> Vec<Vec<u8>>
Returns all connection header tokens (comma-split, trimmed)
pub fn is_100_continue(&self) -> bool
Trait Implementations§
Source§impl<'a> IntoIterator for &'a Headers<'a>
impl<'a> IntoIterator for &'a Headers<'a>
Source§impl<'a> IntoIterator for &'a mut Headers<'a>
impl<'a> IntoIterator for &'a mut Headers<'a>
impl<'a> StructuralPartialEq for Headers<'a>
Auto Trait Implementations§
impl<'a> Freeze for Headers<'a>
impl<'a> RefUnwindSafe for Headers<'a>
impl<'a> Send for Headers<'a>
impl<'a> Sync for Headers<'a>
impl<'a> Unpin for Headers<'a>
impl<'a> UnwindSafe for Headers<'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