Struct hyper_router::RouterBuilder [] [src]

pub struct RouterBuilder { /* fields omitted */ }

Builder for a router

Example usage:

Methods

impl RouterBuilder
[src]

[src]

[src]

Adds new Route for Router that is being built.

Example:

This example is not tested
use hyper::server::{Request, Response};
use hyper_router::{Route, RouterBuilder};

fn some_handler(_: Request) -> Response {
  // do something
}

RouterBuilder::new().add(Route::get(r"/person/\d+").using(some_handler));

[src]

Trait Implementations

impl Debug for RouterBuilder
[src]

[src]

Formats the value using the given formatter. Read more