Struct tower_http::map_response_body::MapResponseBodyLayer
source · [−]pub struct MapResponseBodyLayer<F> { /* private fields */ }This is supported on crate feature
map-response-body only.Expand description
Apply a transformation to the response body.
See the module docs for an example.
Implementations
Create a new MapResponseBodyLayer.
F is expected to be a function that takes a body and returns another body.
Trait Implementations
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
Mutably borrows from an owned value. Read more
This is supported on crate feature
follow-redirect only.Create a new Policy that returns Action::Follow only if self and other return
Action::Follow. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more