pub struct SingleRouteBuilder<'a, M, C, P, PE, QSE> where
    M: RouteMatcher + Send + Sync + 'static,
    C: PipelineHandleChain<P> + Send + Sync + 'static,
    P: Send + Sync + 'static,
    PE: PathExtractor<Body> + Send + Sync + 'static,
    QSE: QueryStringExtractor<Body> + Send + Sync + 'static, 
{ /* private fields */ }
Expand description

Implements the traits required to define a single route, after determining which request paths will be dispatched here. The DefineSingleRoute trait has documentation for using this type.

Trait Implementations

Directs the route to the given Handler, automatically creating a NewHandler which copies the Handler. This is the easiest option for code which is using bare functions as Handler functions. Read more

Directs the route to the given NewHandler. This gives more control over how Handler values are constructed. Read more

Applies a PathExtractor type to the current route, to extract path parameters into State with the given type. Read more

Applies a QueryStringExtractor type to the current route, to extract query parameters into State with the given type. Read more

Adds additional RouteMatcher requirements to the current route. Read more

Directs the route to serve static files from the given root directory. The route must contain a trailing glob segment, which will be used to serve any matching names under the given path. Read more

Directs the route to serve a single static file from the given path. Read more

The type returned when extending the existing RouteMatcher with the target type.

The type returned when replacing the PathExtractor with the target type.

The type returned when replacing the QueryStringExtractor with the target type.

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.