Struct hyper_router::Route [] [src]

pub struct Route {
    pub method: Method,
    pub path: Path,
    pub handler: Handler,
}

Holds route information

Fields

method

HTTP method to match

path

Path to match

handler

Request handler

This should be method that accepts Hyper's Request and Response:

fn hello_handler(_: Request, res: Response) {
  res.send(b"Hello World").unwrap();
}

Trait Implementations

impl Debug for Route

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