pub struct AndThen<A, B> { /* private fields */ }Expand description
Service for the and_then combinator, chaining a computation onto the end
of another service which completes successfully.
This is created by the ServiceExt::and_then method.
Trait Implementations§
Source§impl<A, B, St, Req> Service<St, Req> for AndThen<A, B>
impl<A, B, St, Req> Service<St, Req> for AndThen<A, B>
Source§type Res = <B as Service<St, <A as Service<St, Req>>::Res>>::Res
type Res = <B as Service<St, <A as Service<St, Req>>::Res>>::Res
Responses that the service could provide.
Source§type Error = <A as Service<St, Req>>::Error
type Error = <A as Service<St, Req>>::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, A::Error>
async fn call( &self, req: Req, ctx: Ctx<'_, Self, St>, ) -> Result<B::Res, A::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 AndThen<A, B>
impl<A, B> RefUnwindSafe for AndThen<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for AndThen<A, B>
impl<A, B> Sync for AndThen<A, B>
impl<A, B> Unpin for AndThen<A, B>
impl<A, B> UnsafeUnpin for AndThen<A, B>where
A: UnsafeUnpin,
B: UnsafeUnpin,
impl<A, B> UnwindSafe for AndThen<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