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,
§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.