Struct actix_web_lab::middleware::MapResMiddleware
source · pub struct MapResMiddleware<F> { /* private fields */ }
Expand description
Middleware transform for map_response
.
Trait Implementations§
source§impl<S, F, Fut, B, B2> Transform<S, ServiceRequest> for MapResMiddleware<F>where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
F: Fn(ServiceResponse<B>) -> Fut,
Fut: Future<Output = Result<ServiceResponse<B2>, Error>>,
B2: MessageBody,
impl<S, F, Fut, B, B2> Transform<S, ServiceRequest> for MapResMiddleware<F>where S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error>, F: Fn(ServiceResponse<B>) -> Fut, Fut: Future<Output = Result<ServiceResponse<B2>, Error>>, B2: MessageBody,
§type Response = ServiceResponse<B2>
type Response = ServiceResponse<B2>
Responses produced by the service.
§type Future = Ready<Result<<MapResMiddleware<F> as Transform<S, ServiceRequest>>::Transform, <MapResMiddleware<F> as Transform<S, ServiceRequest>>::InitError>>
type Future = Ready<Result<<MapResMiddleware<F> as Transform<S, ServiceRequest>>::Transform, <MapResMiddleware<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 MapResMiddleware<F>where F: RefUnwindSafe,
impl<F> !Send for MapResMiddleware<F>
impl<F> !Sync for MapResMiddleware<F>
impl<F> Unpin for MapResMiddleware<F>
impl<F> UnwindSafe for MapResMiddleware<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