pub struct MapResponseBodyLayer<F> { /* private fields */ }
Available on crate feature
map-response-body
only.Expand description
Apply a transformation to the response body.
See the module docs for an example.
Implementations§
source§impl<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§
source§impl<F: Clone> Clone for MapResponseBodyLayer<F>
impl<F: Clone> Clone for MapResponseBodyLayer<F>
source§fn clone(&self) -> MapResponseBodyLayer<F>
fn clone(&self) -> MapResponseBodyLayer<F>
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 more