-
Notifications
You must be signed in to change notification settings - Fork 44
Description
I'm working on a web framework that closely integrates with Postgres, and one feature I'd like to offer is the ability to define preprocessors that run before the main request handler does. My request handlers currently use matchit for routing, and I'd like to let users register preprocessors using the same syntax. But whereas every request should only match one request handler, it should potentially be able to match multiple preprocessors. The current Router API won't let me retrieve all the matching paths, so to do this today, I'll need to create a separate router for every preprocessor, and call at on all of them (I'll look at the static prefix portion of each preprocessor paths to skip evaluating some of them).
Would providing a Router::all_at method that returns a Vec<Match> of all the matches for a path be a reasonable feature for this crate?