Struct nickel::router::router::Route

source ·
pub struct Route<D = ()> {
    pub method: Method,
    pub handler: Box<dyn Middleware<D> + Send + Sync + 'static>,
    /* private fields */
}
Expand description

A Route is the basic data structure that stores both the path and the handler that gets executed for the route. The path can contain variable pattern such as user/:userid/invoices

Fields

method: Methodhandler: Box<dyn Middleware<D> + Send + Sync + 'static>

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.