matchthem
A high performance, zero-copy URL router with multi-match support.
use Router;
About
matchthem is a fork of matchit, with all its performance and features — and one major addition: Multi-Match Traversal.
Instead of returning just the single most specific match, matchthem can return all matching routes for a given path.
While matchit returns the single most specific route that matches a path, matchthem adds two new methods:
🔍 Router::all_matches(&self, path: &str)
Returns all routes that match the given path. Each result includes both the matched value and any extracted parameters.
use Router;
![WARNING] Returned matches are not ordered by insertion. The order is determined by internal trie traversal.
Router exposes 2 more functions: all_matches, all_matches_mut.
✏️ Router::all_matches_mut(&mut self, path: &str)
Similar to all_matches, but provides mutable access to each matched value.
This is especially useful for collecting, modifying, or aggregating multiple matches in-place:
let mut router = new;
router.insert.unwrap;
router.insert.unwrap;
for m in router.all_matches_mut
Credits
See.