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
});

fn build(self) -> Router

Trait Implementations

Derived Implementations

impl Debug for RouterBuilder

fn fmt(&self, __arg_0: &mut Formatter) -> Result