Struct nickel::router::router::Router

source ·
pub struct Router<D = ()> { /* private fields */ }
Expand description

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).

Implementations

Trait Implementations

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Get the TypeId of this object.