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,
source§type Response = ServiceResponse<B2>
type Response = ServiceResponse<B2>
Responses produced by the service.
source§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> Freeze for MapResMiddleware<F>
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more