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)
.
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
fn post<M: Into<Matcher>, H: Middleware<D>>( &mut self, matcher: M, handler: H ) -> &mut Self | [src] |
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
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
impl<T> Typeable for T where T: Any, | |
Get the TypeId
of this object.
impl<T> UnsafeAny for T where T: Any, | |