Struct tower_http::map_response_body::MapResponseBodyLayer
source · [−]pub struct MapResponseBodyLayer<F> { /* private fields */ }
Expand description
Apply a transformation to the response body.
See the module docs for an example.
Implementations
sourceimpl<F> MapResponseBodyLayer<F>
impl<F> MapResponseBodyLayer<F>
sourcepub fn new(f: F) -> Self
pub fn new(f: F) -> Self
Create a new MapResponseBodyLayer
.
F
is expected to be a function that takes a body and returns another body.
Trait Implementations
sourceimpl<F: Clone> Clone for MapResponseBodyLayer<F>
impl<F: Clone> Clone for MapResponseBodyLayer<F>
sourcefn clone(&self) -> MapResponseBodyLayer<F>
fn clone(&self) -> MapResponseBodyLayer<F>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<F> Debug for MapResponseBodyLayer<F>
impl<F> Debug for MapResponseBodyLayer<F>
sourceimpl<S, F> Layer<S> for MapResponseBodyLayer<F> where
F: Clone,
impl<S, F> Layer<S> for MapResponseBodyLayer<F> where
F: Clone,
Auto Trait Implementations
impl<F> RefUnwindSafe for MapResponseBodyLayer<F> where
F: RefUnwindSafe,
impl<F> Send for MapResponseBodyLayer<F> where
F: Send,
impl<F> Sync for MapResponseBodyLayer<F> where
F: Sync,
impl<F> Unpin for MapResponseBodyLayer<F> where
F: Unpin,
impl<F> UnwindSafe for MapResponseBodyLayer<F> where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more