pub struct PipelineBuilder<T> where
    T: NewMiddlewareChain, 
{ /* private fields */ }
Expand description

Allows a pipeline to be defined by adding NewMiddleware values, and building a Pipeline.

Examples

new_pipeline()
    .add(MiddlewareOne)
    .add(MiddlewareTwo)
    .add(MiddlewareThree)
    .build();

The pipeline defined here is invoked in this order:

(&mut state)MiddlewareOneMiddlewareTwoMiddlewareThreehandler (provided later, when building the router)

Implementations

Builds a Pipeline, which contains all middleware in the order provided via add and is ready to process requests via a NewHandler provided to Pipeline::call.

Adds a NewMiddleware which will create a Middleware during request dispatch.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.