pub trait PipelineHandleChain<P>: RefUnwindSafe {
    // Required method
    fn call<F>(
        &self,
        pipelines: &PipelineSet<P>,
        state: State,
        f: F
    ) -> Pin<Box<HandlerFuture>>
       where F: FnOnce(State) -> Pin<Box<HandlerFuture>> + Send + 'static;
}
Expand description

A heterogeneous list of Handle<P, _> values, where P is a pipeline type. The pipelines are borrowed and invoked in order to serve a request.

Implemented using nested tuples, with () marking the end of the list. The list is in the reverse order of their invocation when a request is dispatched.

That is:

(p3, (p2, (p1, ())))

will be invoked as:

(state, request)p1p2p3handler

Required Methods§

source

fn call<F>( &self, pipelines: &PipelineSet<P>, state: State, f: F ) -> Pin<Box<HandlerFuture>>where F: FnOnce(State) -> Pin<Box<HandlerFuture>> + Send + 'static,

Invokes this part of the PipelineHandleChain, with requests being passed through to f once all Middleware in the Pipeline have passed the request through.

Implementations on Foreign Types§

source§

impl<P, T, N, U> PipelineHandleChain<P> for (Handle<Pipeline<T>, N>, U)where T: NewMiddlewareChain, T::Instance: Send + 'static, U: PipelineHandleChain<P>, P: Lookup<Pipeline<T>, N>, N: RefUnwindSafe,

Part of a PipelineHandleChain which references a Pipeline and continues with a tail element.

source§

fn call<F>( &self, pipelines: &PipelineSet<P>, state: State, f: F ) -> Pin<Box<HandlerFuture>>where F: FnOnce(State) -> Pin<Box<HandlerFuture>> + Send + 'static,

source§

impl<P> PipelineHandleChain<P> for ()

The marker for the end of a PipelineHandleChain.

source§

fn call<F>( &self, _: &PipelineSet<P>, state: State, f: F ) -> Pin<Box<HandlerFuture>>where F: FnOnce(State) -> Pin<Box<HandlerFuture>> + Send + 'static,

Implementors§