Struct esp_idf_svc::http::Headers

source ·
pub struct Headers<'b, const N: usize = 64>(/* private fields */);

Implementations§

source§

impl<'b, const N: usize> Headers<'b, N>

source

pub const fn new() -> Headers<'b, N>

source

pub fn content_len(&self) -> Option<u64>

source

pub fn content_type(&self) -> Option<&str>

source

pub fn content_encoding(&self) -> Option<&str>

source

pub fn transfer_encoding(&self) -> Option<&str>

source

pub fn host(&self) -> Option<&str>

source

pub fn connection(&self) -> Option<&str>

source

pub fn cache_control(&self) -> Option<&str>

source

pub fn upgrade(&self) -> Option<&str>

source

pub fn iter(&self) -> impl Iterator<Item = (&str, &str)>

source

pub fn get(&self, name: &str) -> Option<&str>

source

pub fn try_set( &mut self, name: &'b str, value: &'b str ) -> Result<&mut Headers<'b, N>, HeaderSetError>

source

pub fn set(&mut self, name: &'b str, value: &'b str) -> &mut Headers<'b, N>

source

pub fn remove(&mut self, name: &str) -> &mut Headers<'b, N>

source

pub fn set_content_len( &mut self, content_len: u64, buf: &'b mut String<20> ) -> &mut Headers<'b, N>

source

pub fn set_content_type(&mut self, content_type: &'b str) -> &mut Headers<'b, N>

source

pub fn set_content_encoding( &mut self, content_encoding: &'b str ) -> &mut Headers<'b, N>

source

pub fn set_transfer_encoding( &mut self, transfer_encoding: &'b str ) -> &mut Headers<'b, N>

source

pub fn set_transfer_encoding_chunked(&mut self) -> &mut Headers<'b, N>

source

pub fn set_host(&mut self, host: &'b str) -> &mut Headers<'b, N>

source

pub fn set_connection(&mut self, connection: &'b str) -> &mut Headers<'b, N>

source

pub fn set_connection_close(&mut self) -> &mut Headers<'b, N>

source

pub fn set_connection_keep_alive(&mut self) -> &mut Headers<'b, N>

source

pub fn set_connection_upgrade(&mut self) -> &mut Headers<'b, N>

source

pub fn set_cache_control(&mut self, cache: &'b str) -> &mut Headers<'b, N>

source

pub fn set_cache_control_no_cache(&mut self) -> &mut Headers<'b, N>

source

pub fn set_upgrade(&mut self, upgrade: &'b str) -> &mut Headers<'b, N>

source

pub fn set_upgrade_websocket(&mut self) -> &mut Headers<'b, N>

source

pub fn as_slice(&self) -> &[(&'b str, &'b str)]

source

pub fn release(self) -> [(&'b str, &'b str); N]

Trait Implementations§

source§

impl<'b, const N: usize> Debug for Headers<'b, N>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'b, const N: usize> Default for Headers<'b, N>

source§

fn default() -> Headers<'b, N>

Returns the “default value” for a type. Read more
source§

impl<'b, const N: usize> Headers for Headers<'b, N>

source§

fn header(&self, name: &str) -> Option<&str>

source§

fn content_type(&self) -> Option<&str>

source§

fn content_len(&self) -> Option<u64>

source§

fn content_encoding(&self) -> Option<&str>

source§

fn transfer_encoding(&self) -> Option<&str>

source§

fn host(&self) -> Option<&str>

source§

fn connection(&self) -> Option<&str>

source§

fn cache_control(&self) -> Option<&str>

source§

fn upgrade(&self) -> Option<&str>

Auto Trait Implementations§

§

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> UnwindSafe for Headers<'b, N>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.