pavex icon indicating copy to clipboard operation
pavex copied to clipboard

feat: Add `#[derive(FromRequest)]` macro for ergonomic extraction

Open LukeMathWalker opened this issue 3 months ago • 1 comments

LukeMathWalker avatar Oct 22 '25 14:10 LukeMathWalker

The macro design in this PR is viable, and it's the interface we want to go for. The implementation, though, isn't: this hardcodes specific constructors for each part of the request we are working with, violating Pavex's attempt to make everything customizable. To properly support our goal, we will have to introduce a new feature in the dependency injection framework: allow the user to register a fallible constructor and then get a Result<T, E> injected, rather than passing than handling that Result automatically via a match + error handler invocation.

LukeMathWalker avatar Nov 30 '25 12:11 LukeMathWalker