pub struct Headers<'b, const N: usize = 64>(/* private fields */);Implementations§
Source§impl<'b, const N: usize> Headers<'b, N>
impl<'b, const N: usize> Headers<'b, N>
pub const fn new() -> Self
pub fn content_len(&self) -> Option<u64>
pub fn content_type(&self) -> Option<&str>
pub fn content_encoding(&self) -> Option<&str>
pub fn transfer_encoding(&self) -> Option<&str>
pub fn host(&self) -> Option<&str>
pub fn connection(&self) -> Option<&str>
pub fn cache_control(&self) -> Option<&str>
pub fn upgrade(&self) -> Option<&str>
pub fn iter(&self) -> impl Iterator<Item = (&str, &str)>
pub fn get(&self, name: &str) -> Option<&str>
pub fn try_set( &mut self, name: &'b str, value: &'b str, ) -> Result<&mut Self, HeaderSetError>
pub fn set(&mut self, name: &'b str, value: &'b str) -> &mut Self
pub fn remove(&mut self, name: &str) -> &mut Self
pub fn set_content_len( &mut self, content_len: u64, buf: &'b mut String<20>, ) -> &mut Self
pub fn set_content_type(&mut self, content_type: &'b str) -> &mut Self
pub fn set_content_encoding(&mut self, content_encoding: &'b str) -> &mut Self
pub fn set_transfer_encoding(&mut self, transfer_encoding: &'b str) -> &mut Self
pub fn set_transfer_encoding_chunked(&mut self) -> &mut Self
pub fn set_host(&mut self, host: &'b str) -> &mut Self
pub fn set_connection(&mut self, connection: &'b str) -> &mut Self
pub fn set_connection_close(&mut self) -> &mut Self
pub fn set_connection_keep_alive(&mut self) -> &mut Self
pub fn set_connection_upgrade(&mut self) -> &mut Self
pub fn set_cache_control(&mut self, cache: &'b str) -> &mut Self
pub fn set_cache_control_no_cache(&mut self) -> &mut Self
pub fn set_upgrade(&mut self, upgrade: &'b str) -> &mut Self
pub fn set_upgrade_websocket(&mut self) -> &mut Self
pub fn as_slice(&self) -> &[(&'b str, &'b str)]
pub fn release(self) -> [(&'b str, &'b str); N]
Trait Implementations§
Source§impl<const N: usize> Headers for Headers<'_, N>
impl<const N: usize> Headers for Headers<'_, N>
fn header(&self, name: &str) -> Option<&str>
fn content_type(&self) -> Option<&str>
fn content_len(&self) -> Option<u64>
fn content_encoding(&self) -> Option<&str>
fn transfer_encoding(&self) -> Option<&str>
fn host(&self) -> Option<&str>
fn connection(&self) -> Option<&str>
fn cache_control(&self) -> Option<&str>
fn upgrade(&self) -> Option<&str>
Auto Trait Implementations§
impl<'b, const N: usize> Freeze for Headers<'b, N>
impl<'b, const N: usize> RefUnwindSafe for Headers<'b, N>
impl<'b, const N: usize> Send for Headers<'b, N>
impl<'b, const N: usize> Sync for Headers<'b, N>
impl<'b, const N: usize> Unpin for Headers<'b, N>
impl<'b, const N: usize> UnsafeUnpin for Headers<'b, N>
impl<'b, const N: usize> UnwindSafe for Headers<'b, N>
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