Struct actix_web_lab::middleware::MapResBodyMiddleware
source · pub struct MapResBodyMiddleware<F> { /* private fields */ }
Expand description
Middleware transform for map_response_body
.
Trait Implementations§
source§impl<S, F, Fut, B, B2> Transform<S, ServiceRequest> for MapResBodyMiddleware<F>where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
F: Fn(HttpRequest, B) -> Fut,
Fut: Future<Output = Result<B2, Error>>,
B2: MessageBody,
impl<S, F, Fut, B, B2> Transform<S, ServiceRequest> for MapResBodyMiddleware<F>where S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error>, F: Fn(HttpRequest, B) -> Fut, Fut: Future<Output = Result<B2, Error>>, B2: MessageBody,
§type Response = ServiceResponse<B2>
type Response = ServiceResponse<B2>
Responses produced by the service.
§type Future = Ready<Result<<MapResBodyMiddleware<F> as Transform<S, ServiceRequest>>::Transform, <MapResBodyMiddleware<F> as Transform<S, ServiceRequest>>::InitError>>
type Future = Ready<Result<<MapResBodyMiddleware<F> as Transform<S, ServiceRequest>>::Transform, <MapResBodyMiddleware<F> as Transform<S, ServiceRequest>>::InitError>>
The future response value.
source§fn new_transform(&self, service: S) -> Self::Future
fn new_transform(&self, service: S) -> Self::Future
Creates and returns a new Transform component, asynchronously
Auto Trait Implementations§
impl<F> RefUnwindSafe for MapResBodyMiddleware<F>where F: RefUnwindSafe,
impl<F> !Send for MapResBodyMiddleware<F>
impl<F> !Sync for MapResBodyMiddleware<F>
impl<F> Unpin for MapResBodyMiddleware<F>
impl<F> UnwindSafe for MapResBodyMiddleware<F>where F: RefUnwindSafe,
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