Struct Then
pub struct Then<S, F> { /* private fields */ }
Implementations
impl<S, F> Then<S, F>
const fn new(inner: S, f: F) -> SelfCreates a new
Thenservice.fn layer(f: F) -> ThenLayer<F>Returns a new
Layerthat producesThenservices.This is a convenience function that simply calls
ThenLayer::new.
Trait Implementations
impl<S, F> Debug for Then<S, F>
where
S: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<S, F, Request, Response, Error, Fut> Service<Request> for Then<S, F>
where
S: Service<Request>,
S::Error: Into<Error>,
F: FnOnce(Result<S::Response, S::Error>) -> Fut + Clone,
Fut: Future<Output = Result<Response, Error>>,
type Response = Response;type Error = Error;type Future = ThenFuture<<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 Then<S, F>
fn clone(&self) -> Self