Struct ntex_service::dev::Map
source · pub struct Map<A, F, Req, Res> { /* private fields */ }
Expand description
Service for the map
combinator, changing the type of a service’s response.
This is created by the ServiceExt::map
method.
Trait Implementations§
source§impl<A, F, Req, Res> Service<Req> for Map<A, F, Req, Res>where
A: Service<Req>,
F: Fn(A::Response) -> Res,
impl<A, F, Req, Res> Service<Req> for Map<A, F, Req, Res>where A: Service<Req>, F: Fn(A::Response) -> Res,
§type Error = <A as Service<Req>>::Error
type Error = <A as Service<Req>>::Error
Errors produced by the service when polling readiness or executing call.
source§fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Ready
when the service is able to process requests. Read moresource§fn call<'a>(&'a self, req: Req, ctx: ServiceCtx<'a, Self>) -> Self::Future<'a>
fn call<'a>(&'a self, req: Req, ctx: ServiceCtx<'a, Self>) -> Self::Future<'a>
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<A, F, Req, Res> RefUnwindSafe for Map<A, F, Req, Res>where A: RefUnwindSafe, F: RefUnwindSafe,
impl<A, F, Req, Res> Send for Map<A, F, Req, Res>where A: Send, F: Send,
impl<A, F, Req, Res> Sync for Map<A, F, Req, Res>where A: Sync, F: Sync,
impl<A, F, Req, Res> Unpin for Map<A, F, Req, Res>where A: Unpin, F: Unpin,
impl<A, F, Req, Res> UnwindSafe for Map<A, F, Req, Res>where A: UnwindSafe, 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
source§impl<Svc, Req> IntoService<Svc, Req> for Svcwhere
Svc: Service<Req>,
impl<Svc, Req> IntoService<Svc, Req> for Svcwhere Svc: Service<Req>,
source§fn into_service(self) -> Svc
fn into_service(self) -> Svc
Convert to a
Service