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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more