pub struct MapRequestBodyLayer<F> { /* private fields */ }
Available on crate feature
map-request-body
only.Expand description
Apply a transformation to the request body.
See the module docs for an example.
Implementations§
Source§impl<F> MapRequestBodyLayer<F>
impl<F> MapRequestBodyLayer<F>
Sourcepub fn new(f: F) -> Self
pub fn new(f: F) -> Self
Create a new MapRequestBodyLayer
.
F
is expected to be a function that takes a body and returns another body.
Trait Implementations§
Source§impl<F: Clone> Clone for MapRequestBodyLayer<F>
impl<F: Clone> Clone for MapRequestBodyLayer<F>
Source§fn clone(&self) -> MapRequestBodyLayer<F>
fn clone(&self) -> MapRequestBodyLayer<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 MapRequestBodyLayer<F>
impl<F> Debug for MapRequestBodyLayer<F>
Auto Trait Implementations§
impl<F> Freeze for MapRequestBodyLayer<F>where
F: Freeze,
impl<F> RefUnwindSafe for MapRequestBodyLayer<F>where
F: RefUnwindSafe,
impl<F> Send for MapRequestBodyLayer<F>where
F: Send,
impl<F> Sync for MapRequestBodyLayer<F>where
F: Sync,
impl<F> Unpin for MapRequestBodyLayer<F>where
F: Unpin,
impl<F> UnwindSafe for MapRequestBodyLayer<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