Nested Router
Path segment matching for nested routers.
How to use
-
Define your routes:
-
Use the two routers:
let = route_list_1; let absolute_path = "/123/456"; let relative_path = &absolute_path; let RouteOutput = root.route.unwrap; assert_eq!; assert_eq!; // Your business logic here for the first route let RouteOutput = sub.route.unwrap; assert_eq!; assert_eq!; assert_eq!; // Your business logic here for the second route
Restrictions
Route::path
should not capture wildcard with name"_sub_path"
(crate::SUB_PATH_WILDCARD_NAME
).