Struct hyper_router::route::Route [] [src]

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

Holds route information

Fields

HTTP method to match

Path to match

Request handler

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

use hyper::server::{Request, Response};

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

Methods

impl Route
[src]

Trait Implementations

impl Default for Route
[src]

Returns the "default value" for a type. Read more

impl Debug for Route
[src]

Formats the value using the given formatter.