pub struct AndThen<H, F> { /* private fields */ }Expand description
Calls op if the output is Ok, otherwise returns the Err value of the output.
Trait Implementations
sourceimpl<H, F, I, O> Handler<I> for AndThen<H, F> where
    I: Send + 'static,
    O: Send,
    H: Handler<I, Output = Result<O>> + Clone,
    F: Handler<O, Output = H::Output> + Clone, 
 
impl<H, F, I, O> Handler<I> for AndThen<H, F> where
    I: Send + 'static,
    O: Send,
    H: Handler<I, Output = Result<O>> + Clone,
    F: Handler<O, Output = H::Output> + Clone, 
sourcefn call<'life0, 'async_trait>(
    &'life0 self,
    i: I
) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
    P: DerefMut,
    <P as Deref>::Target: Future,     type Output = <<P as Deref>::Target as Future>::Output; where
    'life0: 'async_trait,
    Self: 'async_trait, 
 
fn call<'life0, 'async_trait>(
    &'life0 self,
    i: I
) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
    P: DerefMut,
    <P as Deref>::Target: Future,     type Output = <<P as Deref>::Target as Future>::Output; where
    'life0: 'async_trait,
    Self: 'async_trait, 
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Performs the call operation.
Auto Trait Implementations
impl<H, F> RefUnwindSafe for AndThen<H, F> where
    F: RefUnwindSafe,
    H: RefUnwindSafe, 
impl<H, F> Send for AndThen<H, F> where
    F: Send,
    H: Send, 
impl<H, F> Sync for AndThen<H, F> where
    F: Sync,
    H: Sync, 
impl<H, F> Unpin for AndThen<H, F> where
    F: Unpin,
    H: Unpin, 
impl<H, F> UnwindSafe for AndThen<H, F> where
    F: UnwindSafe,
    H: UnwindSafe, 
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<I, T> HandlerExt<I> for T where
    T: Handler<I> + ?Sized, 
 
impl<I, T> HandlerExt<I> for T where
    T: Handler<I> + ?Sized, 
sourcefn boxed(self) -> BoxHandler<I, Self::Output> where
    Self: Sized, 
 
fn boxed(self) -> BoxHandler<I, Self::Output> where
    Self: Sized, 
Converts this Handler into a BoxHandler.
sourcefn before<F>(self, f: F) -> Before<Self, F> where
    Self: Sized, 
 
fn before<F>(self, f: F) -> Before<Self, F> where
    Self: Sized, 
Maps the input before the handler calls.
sourcefn after<F>(self, f: F) -> After<Self, F> where
    Self: Sized, 
 
fn after<F>(self, f: F) -> After<Self, F> where
    Self: Sized, 
Maps the output Result<T> after the handler called.
sourcefn around<F>(self, f: F) -> Around<Self, F> where
    Self: Sized, 
 
fn around<F>(self, f: F) -> Around<Self, F> where
    Self: Sized, 
Wraps around the remaining handler or middleware chain.
sourcefn map<F>(self, f: F) -> Map<Self, F> where
    Self: Sized, 
 
fn map<F>(self, f: F) -> Map<Self, F> where
    Self: Sized, 
Maps the Ok value of the output if after the handler called.
sourcefn map_into_response<O>(self) -> MapInToResponse<Self, O> where
    Self: Sized, 
 
fn map_into_response<O>(self) -> MapInToResponse<Self, O> where
    Self: Sized, 
Maps the handler’s output type to the Response.
sourcefn and_then<F>(self, f: F) -> AndThen<Self, F> where
    Self: Sized, 
 
fn and_then<F>(self, f: F) -> AndThen<Self, F> where
    Self: Sized, 
Calls op if the result is Ok, otherwise returns the Err value of self.
sourcefn map_err<F>(self, f: F) -> MapErr<Self, F> where
    Self: Sized, 
 
fn map_err<F>(self, f: F) -> MapErr<Self, F> where
    Self: Sized, 
Maps the Err value of the output if after the handler called.
sourcefn or_else<F>(self, f: F) -> OrElse<Self, F> where
    Self: Sized, 
 
fn or_else<F>(self, f: F) -> OrElse<Self, F> where
    Self: Sized, 
Calls op if the output is Err, otherwise returns the Ok value of the output.
sourcefn catch_error<F, R, E>(self, f: F) -> CatchError<Self, F, R, E> where
    Self: Sized, 
 
fn catch_error<F, R, E>(self, f: F) -> CatchError<Self, F, R, E> where
    Self: Sized, 
Catches rejected error while calling the handler.
sourcefn catch_unwind<F>(self, f: F) -> CatchUnwind<Self, F> where
    Self: Sized, 
 
fn catch_unwind<F>(self, f: F) -> CatchUnwind<Self, F> where
    Self: Sized, 
Catches unwinding panics while calling the handler.
sourceimpl<T> Instrument for T
 
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
    T: Future,     type Output = <T as Future>::Output;
 
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
    T: Future,     type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
    T: Future,     type Output = <T as Future>::Output;
 
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
    T: Future,     type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
 
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
    T: Future,     type Output = <T as Future>::Output; where
    S: Into<Dispatch>, 
 
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
    T: Future,     type Output = <T as Future>::Output; where
    S: Into<Dispatch>, 
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
    T: Future,     type Output = <T as Future>::Output;
 
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
    T: Future,     type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more