Struct hyper_router::RouterBuilder
[−]
[src]
pub struct RouterBuilder { // some fields omitted }
Builder for a router
Example usage:
Methods
impl RouterBuilder
fn new() -> RouterBuilder
fn add(self, route: Route) -> RouterBuilder
Adds new Route
for Router
that is being built.
Example:
builder.add(Route { method: Get, path: Path::new(r"/person/\d+"), handler: some_handler });