Type Alias Srhl

Source
type Srhl = SetResponseHeaderLayer<HeaderValue>;

Aliased Type§

struct Srhl { /* private fields */ }

Implementations

§

impl<M> SetResponseHeaderLayer<M>

pub fn overriding(header_name: HeaderName, make: M) -> SetResponseHeaderLayer<M>

Create a new [SetResponseHeaderLayer].

If a previous value exists for the same header, it is removed and replaced with the new header value.

pub fn appending(header_name: HeaderName, make: M) -> SetResponseHeaderLayer<M>

Create a new [SetResponseHeaderLayer].

The new header is always added, preserving any existing values. If previous values exist, the header will have multiple values.

pub fn if_not_present( header_name: HeaderName, make: M, ) -> SetResponseHeaderLayer<M>

Create a new [SetResponseHeaderLayer].

If a previous value exists for the header, the new value is not inserted.

Trait Implementations

§

impl<M> Clone for SetResponseHeaderLayer<M>
where M: Clone,

§

fn clone(&self) -> SetResponseHeaderLayer<M>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<M> Debug for SetResponseHeaderLayer<M>

§

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

Formats the value using the given formatter. Read more
§

impl<S, M> Layer<S> for SetResponseHeaderLayer<M>
where M: Clone,

§

type Service = SetResponseHeader<S, M>

The wrapped service
§

fn layer(&self, inner: S) -> <SetResponseHeaderLayer<M> as Layer<S>>::Service

Wrap the given service with the middleware, returning a new service that has been decorated with the middleware.