Struct percy_router::prelude::Route
source · pub struct Route { /* private fields */ }
Expand description
A route specifies a path to match against. When a match is found a view_creator
is used
to return an impl View
that can be used to render the appropriate content for that route.
Implementations§
source§impl Route
impl Route
sourcepub fn new(
route_definition: &'static str,
route_param_parser: ParseRouteParam
) -> Route
pub fn new(
route_definition: &'static str,
route_param_parser: ParseRouteParam
) -> Route
Create a new Route. You’ll usually later call route.match(…) in order to see if a given the path in the browser URL matches your route’s path definition.