pub trait PipelineHandleChain<P>: RefUnwindSafe {
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) → p1 → p2 → p3 → handler
Required methods
fn call<F>(
&self,
pipelines: &PipelineSet<P>,
state: State,
f: F
) -> Pin<Box<HandlerFuture>> where
F: FnOnce(State) -> Pin<Box<HandlerFuture>> + Send + 'static,
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
sourceimpl<'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,
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,
Part of a PipelineHandleChain which references a Pipeline and continues with a tail element.
fn call<F>(
&self,
pipelines: &PipelineSet<P>,
state: State,
f: F
) -> Pin<Box<HandlerFuture>> where
F: FnOnce(State) -> Pin<Box<HandlerFuture>> + Send + 'static,
sourceimpl<P> PipelineHandleChain<P> for ()
impl<P> PipelineHandleChain<P> for ()
The marker for the end of a PipelineHandleChain.