Struct AndThen
pub struct AndThen<S, F> { /* private fields */ }
Service returned by the and_then combinator.
Implementations
impl<S, F> AndThen<S, F>
const fn new(inner: S, f: F) -> SelfCreates a new
AndThenservice.fn layer(f: F) -> AndThenLayer<F>Returns a new
Layerthat producesAndThenservices.This is a convenience function that simply calls
AndThenLayer::new.
Trait Implementations
impl<S, F> Debug for AndThen<S, F>
where
S: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<S, F, Request, Fut> Service<Request> for AndThen<S, F>
where
S: Service<Request>,
S::Error: Into<Fut::Error>,
F: FnOnce(S::Response) -> Fut + Clone,
Fut: TryFuture,
type Response = <Fut as TryFuture>::Ok;type Error = <Fut as TryFuture>::Error;type Future = AndThenFuture<<S as Service<Request>>::Future, Fut, F>;fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>fn call(&mut self, request: Request) -> Self::Future
impl<S: Clone, F: Clone> Clone for AndThen<S, F>
fn clone(&self) -> Self