embedded_svc::http

Trait Headers

Source
pub trait Headers {
    // Required method
    fn header(&self, name: &str) -> Option<&str>;

    // Provided methods
    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> { ... }
}

Required Methods§

Source

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

Provided Methods§

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>

Implementations on Foreign Types§

Source§

impl<H> Headers for &H
where H: Headers,

Source§

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

Source§

impl<H> Headers for &mut H
where H: Headers,

Source§

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

Implementors§

Source§

impl<C> Headers for embedded_svc::http::client::asynch::Response<C>
where C: Connection,

Source§

impl<C> Headers for embedded_svc::http::client::Response<C>
where C: Connection,

Source§

impl<C> Headers for embedded_svc::http::server::asynch::Request<C>
where C: Connection,

Source§

impl<C> Headers for embedded_svc::http::server::Request<C>
where C: Connection,

Source§

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