Struct tower_http::map_request_body::MapRequestBodyLayer
source · 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> 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