Trait HeaderOp

Source
pub trait HeaderOp {
    // Required methods
    fn header(&self, name: impl Into<HeaderName>) -> Option<&HeaderValues>;
    fn insert_header(
        &mut self,
        name: impl Into<HeaderName>,
        values: impl ToHeaderValues,
    ) -> Option<HeaderValues>;
}

Required Methods§

Source

fn header(&self, name: impl Into<HeaderName>) -> Option<&HeaderValues>

Source

fn insert_header( &mut self, name: impl Into<HeaderName>, values: impl ToHeaderValues, ) -> Option<HeaderValues>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl HeaderOp for Request

Source§

fn header(&self, name: impl Into<HeaderName>) -> Option<&HeaderValues>

Source§

fn insert_header( &mut self, name: impl Into<HeaderName>, values: impl ToHeaderValues, ) -> Option<HeaderValues>

Source§

impl HeaderOp for Response

Source§

fn header(&self, name: impl Into<HeaderName>) -> Option<&HeaderValues>

Source§

fn insert_header( &mut self, name: impl Into<HeaderName>, values: impl ToHeaderValues, ) -> Option<HeaderValues>

Source§

impl HeaderOp for Response

Source§

fn header(&self, name: impl Into<HeaderName>) -> Option<&HeaderValues>

Source§

fn insert_header( &mut self, name: impl Into<HeaderName>, values: impl ToHeaderValues, ) -> Option<HeaderValues>

Source§

impl<State> HeaderOp for Request<State>

Source§

fn header(&self, name: impl Into<HeaderName>) -> Option<&HeaderValues>

Source§

fn insert_header( &mut self, name: impl Into<HeaderName>, values: impl ToHeaderValues, ) -> Option<HeaderValues>

Implementors§