pub struct ResponseFmt<Headers, StatusCode> { /* private fields */ }
Expand description
Allows the modification the responses status code Display
and headers
Debug
to accommodate sensitivity.
This enjoys MakeFmt
for &HeaderMap
and StatusCode
.
Implementations§
source§impl ResponseFmt<MakeIdentity, MakeIdentity>
impl ResponseFmt<MakeIdentity, MakeIdentity>
sourcepub fn new() -> Self
pub fn new() -> Self
Constructs a new ResponseFmt
with no redactions.
source§impl<Header, StatusCode> ResponseFmt<Header, StatusCode>
impl<Header, StatusCode> ResponseFmt<Header, StatusCode>
sourcepub fn header<F>(self, header: F) -> ResponseFmt<MakeHeaders<F>, StatusCode>
pub fn header<F>(self, header: F) -> ResponseFmt<MakeHeaders<F>, StatusCode>
Marks headers as sensitive using a closure.
See SensitiveHeaders
for more info.
sourcepub fn status_code(self) -> ResponseFmt<Header, MakeSensitive>
pub fn status_code(self) -> ResponseFmt<Header, MakeSensitive>
Marks request status code as sensitive.
Trait Implementations§
source§impl<Headers: Clone, StatusCode: Clone> Clone for ResponseFmt<Headers, StatusCode>
impl<Headers: Clone, StatusCode: Clone> Clone for ResponseFmt<Headers, StatusCode>
source§fn clone(&self) -> ResponseFmt<Headers, StatusCode>
fn clone(&self) -> ResponseFmt<Headers, StatusCode>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<Headers, StatusCode> Debug for ResponseFmt<Headers, StatusCode>
impl<Headers, StatusCode> Debug for ResponseFmt<Headers, StatusCode>
source§impl<'a, Headers, StatusCode> MakeFmt<&'a HeaderMap> for ResponseFmt<Headers, StatusCode>
impl<'a, Headers, StatusCode> MakeFmt<&'a HeaderMap> for ResponseFmt<Headers, StatusCode>
source§impl<Headers, StatusCode> MakeFmt<StatusCode> for ResponseFmt<Headers, StatusCode>where
StatusCode: MakeFmt<StatusCode>,
impl<Headers, StatusCode> MakeFmt<StatusCode> for ResponseFmt<Headers, StatusCode>where
StatusCode: MakeFmt<StatusCode>,
Auto Trait Implementations§
impl<Headers, StatusCode> Freeze for ResponseFmt<Headers, StatusCode>
impl<Headers, StatusCode> RefUnwindSafe for ResponseFmt<Headers, StatusCode>where
Headers: RefUnwindSafe,
StatusCode: RefUnwindSafe,
impl<Headers, StatusCode> Send for ResponseFmt<Headers, StatusCode>
impl<Headers, StatusCode> Sync for ResponseFmt<Headers, StatusCode>
impl<Headers, StatusCode> Unpin for ResponseFmt<Headers, StatusCode>
impl<Headers, StatusCode> UnwindSafe for ResponseFmt<Headers, StatusCode>where
Headers: UnwindSafe,
StatusCode: UnwindSafe,
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.