pub struct MapResponseBodyLayer<F> { /* private fields */ }
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 moresource§impl<F> Debug for MapResponseBodyLayer<F>
impl<F> Debug for MapResponseBodyLayer<F>
Auto Trait Implementations§
impl<F> Freeze for MapResponseBodyLayer<F>where
F: Freeze,
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§
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
)