Struct AddRequiredResponseHeadersLayer
pub struct AddRequiredResponseHeadersLayer { /* private fields */ }http only.Expand description
Layer that applies AddRequiredResponseHeaders which adds a request header.
See AddRequiredResponseHeaders for more details.
Implementations§
§impl AddRequiredResponseHeadersLayer
impl AddRequiredResponseHeadersLayer
pub const fn new() -> AddRequiredResponseHeadersLayer
pub const fn new() -> AddRequiredResponseHeadersLayer
Create a new AddRequiredResponseHeadersLayer.
pub fn with_overwrite(self, overwrite: bool) -> AddRequiredResponseHeadersLayer
pub fn with_overwrite(self, overwrite: bool) -> AddRequiredResponseHeadersLayer
Set whether to overwrite the existing headers.
If set to true, the headers will be overwritten.
Default is false.
pub fn set_overwrite(
&mut self,
overwrite: bool,
) -> &mut AddRequiredResponseHeadersLayer
pub fn set_overwrite( &mut self, overwrite: bool, ) -> &mut AddRequiredResponseHeadersLayer
Set whether to overwrite the existing headers.
If set to true, the headers will be overwritten.
Default is false.
pub fn maybe_with_server_header_value(
self,
value: Option<HeaderValue>,
) -> AddRequiredResponseHeadersLayer
pub fn maybe_with_server_header_value( self, value: Option<HeaderValue>, ) -> AddRequiredResponseHeadersLayer
Define the custom SERVER header value.
By default a versioned rama value is used.
pub fn maybe_set_server_header_value(
&mut self,
value: Option<HeaderValue>,
) -> &mut AddRequiredResponseHeadersLayer
pub fn maybe_set_server_header_value( &mut self, value: Option<HeaderValue>, ) -> &mut AddRequiredResponseHeadersLayer
Define the custom SERVER header value.
By default a versioned rama value is used.
pub fn with_server_header_value(
self,
value: HeaderValue,
) -> AddRequiredResponseHeadersLayer
pub fn with_server_header_value( self, value: HeaderValue, ) -> AddRequiredResponseHeadersLayer
Define the custom SERVER header value.
By default a versioned rama value is used.
pub fn set_server_header_value(
&mut self,
value: HeaderValue,
) -> &mut AddRequiredResponseHeadersLayer
pub fn set_server_header_value( &mut self, value: HeaderValue, ) -> &mut AddRequiredResponseHeadersLayer
Define the custom SERVER header value.
By default a versioned rama value is used.
pub fn without_server_header_value(self) -> AddRequiredResponseHeadersLayer
pub fn without_server_header_value(self) -> AddRequiredResponseHeadersLayer
Define the custom SERVER header value.
By default a versioned rama value is used.
pub fn unset_server_header_value(
&mut self,
) -> &mut AddRequiredResponseHeadersLayer
pub fn unset_server_header_value( &mut self, ) -> &mut AddRequiredResponseHeadersLayer
Define the custom SERVER header value.
By default a versioned rama value is used.
Trait Implementations§
§impl Clone for AddRequiredResponseHeadersLayer
impl Clone for AddRequiredResponseHeadersLayer
§fn clone(&self) -> AddRequiredResponseHeadersLayer
fn clone(&self) -> AddRequiredResponseHeadersLayer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for AddRequiredResponseHeadersLayer
impl Debug for AddRequiredResponseHeadersLayer
§impl Default for AddRequiredResponseHeadersLayer
impl Default for AddRequiredResponseHeadersLayer
§fn default() -> AddRequiredResponseHeadersLayer
fn default() -> AddRequiredResponseHeadersLayer
§impl<S> Layer<S> for AddRequiredResponseHeadersLayer
impl<S> Layer<S> for AddRequiredResponseHeadersLayer
§type Service = AddRequiredResponseHeaders<S>
type Service = AddRequiredResponseHeaders<S>
§fn layer(
&self,
inner: S,
) -> <AddRequiredResponseHeadersLayer as Layer<S>>::Service
fn layer( &self, inner: S, ) -> <AddRequiredResponseHeadersLayer as Layer<S>>::Service
§fn into_layer(
self,
inner: S,
) -> <AddRequiredResponseHeadersLayer as Layer<S>>::Service
fn into_layer( self, inner: S, ) -> <AddRequiredResponseHeadersLayer as Layer<S>>::Service
layer but consuming self after the service was created. Read moreAuto Trait Implementations§
impl !Freeze for AddRequiredResponseHeadersLayer
impl RefUnwindSafe for AddRequiredResponseHeadersLayer
impl Send for AddRequiredResponseHeadersLayer
impl Sync for AddRequiredResponseHeadersLayer
impl Unpin for AddRequiredResponseHeadersLayer
impl UnwindSafe for AddRequiredResponseHeadersLayer
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more