pub struct Router { /* private fields */ }
Expand description

This is the one. The router.

Implementations

Finds handler for given Hyper request.

This method uses default error handlers. If the request does not match any route than default 404 handler is returned. If the request match some routes but http method does not match (used GET but routes are defined for POST) than default method not supported handler is returned.

Finds handler for given Hyper request.

It returns handler if it’s found or StatusCode for error. This method may return NotFound, MethodNotAllowed or NotImplemented status codes.

Returns vector of Routes that match to given path.

Trait Implementations

Formats the value using the given formatter. 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.