Struct micro_http_async::Route
source ·
[−]pub struct Route { /* fields omitted */ }
Expand description
Route
This struct defines a Route
. A route is an address defined on a webserver by a /
. For example, localhost/search
- /search
is the route.
This struct will store a reference to a function or closure, and will run it automatically when a user visits the corresponding route defined to the function.
Implementations
New
Create a new route, taking in a Boxed function as its input.