pub struct Then<A, B> { /* private fields */ }Expand description
Service for the then combinator, chaining a computation onto the end of
another service.
This is created by the Pipeline::then method.
Trait Implementations§
Source§impl<A, B, St, Req> Service<St, Req> for Then<A, B>
impl<A, B, St, Req> Service<St, Req> for Then<A, B>
Source§type Res = <B as Service<St, Result<<A as Service<St, Req>>::Res, <A as Service<St, Req>>::Error>>>::Res
type Res = <B as Service<St, Result<<A as Service<St, Req>>::Res, <A as Service<St, Req>>::Error>>>::Res
Responses that the service could provide.
Source§type Error = <B as Service<St, Result<<A as Service<St, Req>>::Res, <A as Service<St, Req>>::Error>>>::Error
type Error = <B as Service<St, Result<<A as Service<St, Req>>::Res, <A as Service<St, Req>>::Error>>>::Error
Errors produced by the service while checking readiness or executing a call.
Source§async fn call(
&self,
req: Req,
ctx: Ctx<'_, Self, St>,
) -> Result<B::Res, B::Error>
async fn call( &self, req: Req, ctx: Ctx<'_, Self, St>, ) -> Result<B::Res, B::Error>
Processes a request and asynchronously returns the response. Read more
Source§async fn ready(&self, ctx: Ctx<'_, Self, St>) -> Result<(), Self::Error>
async fn ready(&self, ctx: Ctx<'_, Self, St>) -> Result<(), Self::Error>
Returns when the service is ready to process requests. Read more
Source§fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
Maps this service’s output to a different type, returning a new service. Read more
Source§fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
Maps this service’s error to a different type, returning a new service. Read more
Auto Trait Implementations§
impl<A, B> Freeze for Then<A, B>
impl<A, B> RefUnwindSafe for Then<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Then<A, B>
impl<A, B> Sync for Then<A, B>
impl<A, B> Unpin for Then<A, B>
impl<A, B> UnsafeUnpin for Then<A, B>where
A: UnsafeUnpin,
B: UnsafeUnpin,
impl<A, B> UnwindSafe for Then<A, B>where
A: UnwindSafe,
B: 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<S, St, Req> IntoService<S, St, Req> for Swhere
S: Service<St, Req>,
impl<S, St, Req> IntoService<S, St, Req> for Swhere
S: Service<St, Req>,
Source§fn into_service(self) -> S
fn into_service(self) -> S
Convert to a
Service