Struct nickel::router::router::Router [] [src]

pub struct Router<D = ()> { /* fields omitted */ }

The Router's job is it to hold routes and to resolve them later against concrete URLs. The router is also a regular middleware and needs to be added to the middleware stack with server.utilize(router).

Methods

impl<D> Router<D>
[src]

Trait Implementations

impl<D> HttpRouter<D> for Router<D>
[src]

Registers a handler to be used for a specified method. A handler can be anything implementing the RequestHandler trait. Read more

Registers a handler to be used for a specific GET request. Handlers are assigned to paths and paths are allowed to contain variables and wildcards. Read more

Registers a handler to be used for a specific POST request. Read more

Registers a handler to be used for a specific PUT request. Read more

Registers a handler to be used for a specific DELETE request. Read more

Registers a handler to be used for a specific OPTIONS request. Read more

Registers a handler to be used for a specific PATCH request. Read more

impl<D: 'static> Middleware<D> for Router<D>
[src]