Crate path_router

Source
Expand description

Routing for paths delimited by a forward slash, with the ability to capture specified path segments.

§Example

use path_router::Tree;
let mut routes = Tree::new();
routes.add("GET/user/:username/profile", "profile.html");
assert_eq!(
    routes.find("GET/user/my_name/profile"),
    Some((&"profile.html", vec![("username", "my_name")])));

Structs§

Tree
The routing information is stored as a trie.