[][src]Trait gotham::pipeline::chain::PipelineHandleChain

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

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

fn call<F>(
    &self,
    pipelines: &PipelineSet<P>,
    state: State,
    f: F
) -> Box<HandlerFuture> where
    F: FnOnce(State) -> 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.

Loading content...

Implementations on Foreign Types

impl<'a, 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
[src]

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

impl<P> PipelineHandleChain<P> for ()[src]

The marker for the end of a PipelineHandleChain.

Loading content...

Implementors

Loading content...