rs-router
A RegexSet based router for use with stable Hyper (0.10.x).
The rs stands for RegexSet, not Rust—
Similar to and inspired by reroute, but potentially faster (no unnecessary string allocations, no hashmaps, and method-first-matching).
Provides light wrappers around hyper::server::Request and hyper::server::Response
- to provide some convenience methods, like
req.captures(), which provides the captures of the matchingRegex, - and to enable nice request handlers with signature
fn(req: Request) -> Result<Response, Error>whereErrorimplementsInto<Response>(which allows you to bail out of the handler early on errors).
See /examples/simple.rs for usage.