Struct reroute::RouterBuilder [] [src]

pub struct RouterBuilder { /* fields omitted */ }

A RouterBuilder enables you to build up a set of routes and their handlers to be handled by a Router.

Methods

impl RouterBuilder
[src]

Create a new RouterBuilder with no route handlers.

Install a handler for requests of method verb and which have paths matching route. There are also convenience methods named after the appropriate verb.

Compile the routes in a RouterBuilder to produce a Router capable of handling Hyper requests.

Convenience method to install a GET handler.

Convenience method to install a POST handler.

Convenience method to install a PUT handler.

Convenience method to install a PATCH handler.

Convenience method to install a DELETE handler.

Convenience method to install an OPTIONS handler.

Install a fallback handler for when there is no matching route for a request. If none is installed, the resulting Router will use a default handler.