Open si14 opened 1 year ago
Hi @si14 ,
I agree with you on both points, For the custom rejection part, I personally prefer to just copy and modify axum's extractors, so I wasn't sure what was more idiomatic, and I gladly would accept a PR for it.
For the parsing method part, what names do you suggest for these new extractors?
I noticed that the current
axum
extractor diverges from the officialQuery
design: https://docs.rs/axum/0.6.13/src/axum/extract/query.rs.html#51-65In particular, I think two things can be done to make it a bit more idiomatic:
Rejection
, allowing users to either use the supplied error handler, or acceptResult<QueryString<Foo>, QueryStringRejection>
and deal with it in the handlerWhat do you think of those changes? If you're happy with them, I might make a stab at a PR implementing that.