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>
impl<A, F, Req, Res> Service<Req> for Map<A, F, Req, Res>
Source§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§async fn ready(&self, ctx: ServiceCtx<'_, Self>) -> Result<(), Self::Error>
async fn ready(&self, ctx: ServiceCtx<'_, Self>) -> Result<(), Self::Error>
Returns when the service is able to process requests. Read more
Source§fn poll(&self, cx: &mut Context<'_>) -> Result<(), Self::Error>
fn poll(&self, cx: &mut Context<'_>) -> Result<(), Self::Error>
Polls service from the current task. Read more
Source§async fn call(
&self,
req: Req,
ctx: ServiceCtx<'_, Self>,
) -> Result<Self::Response, Self::Error>
async fn call( &self, req: Req, ctx: ServiceCtx<'_, Self>, ) -> Result<Self::Response, Self::Error>
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<A, F, Req, Res> Freeze for Map<A, F, Req, Res>
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>
impl<A, F, Req, Res> Sync for Map<A, F, Req, Res>
impl<A, F, Req, Res> Unpin for Map<A, F, Req, Res>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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