[−][src]Trait tide_fluent_routes::routebuilder::RouteBuilder
A routebuilder can be used to define routes by adding path segments, middelwares and endpoints to a route tree
Required methods
fn at<R: FnOnce(Self) -> Self>(self, path: &str, routes: R) -> Self
[src]
Add a path segment with a set of sub-routes
fn with<M: Middleware<State>, R: FnOnce(Self) -> Self>(
self,
middleware: M,
routes: R
) -> Self
[src]
self,
middleware: M,
routes: R
) -> Self
Add middleware with a set of sub-routes
fn method(self, method: Method, endpoint: impl Endpoint<State>) -> Self
[src]
Add an endpoint for an http method
fn all(self, endpoint: impl Endpoint<State>) -> Self
[src]
Add a catchall endpoint
fn name(self, name: &str) -> Self
[src]
Make this a named route
Implementors
impl<State: Clone + Send + Sync + 'static> RouteBuilder<State> for RouteSegment<State>
[src]
fn at<R: FnOnce(Self) -> Self>(mut self: Self, path: &str, routes: R) -> Self
[src]
fn with<M: Middleware<State>, R: FnOnce(Self) -> Self>(
mut self: Self,
middleware: M,
routes: R
) -> Self
[src]
mut self: Self,
middleware: M,
routes: R
) -> Self
fn method(
mut self: Self,
method: Method,
endpoint: impl Endpoint<State>
) -> Self
[src]
mut self: Self,
method: Method,
endpoint: impl Endpoint<State>
) -> Self