[][src]Module pathmaker::router

Structs

Build

The builder for the router. This collects all of the routes that the router will have, and then builds the cache to quickly perform lookups for that router.

Route

A single route in the router. This contains information about the path; specifically, the path itself, the method, the handler, and how to match it.

Router

The main router. This contains a set of routes that can be taken, as well as a default hnadler for when the request matches none of those routes. We make no requirements on the Method type here; this is the type used by the HTTP library to represent the HTTP method (e.g. GET, POST, etc.). When routes are created, they're created with this Method type, and when we do a lookup, we make sure the route matches the method.