Remove or change impl FromRequest* for Option<impl FromRequest*>
?
#2298
Labels
A-axum-core
breaking change
A PR that makes a breaking change.
C-musings
Category: musings about a better world
I-needs-decision
Issues in need of decision.
Milestone
The possibility of using
Option<Extractor>
as an extractor has lead to a bunch of confusion because people have expected or wanted it to have different semantics for specific inner extractors. We should consider removing or altering the two implementations.One option: We could have separate traits
OptionalFromRequest
andOptionalFromRequestParts
and implement them only for a handful of types where it actually makes sense to discard the error. We could also implement different behavior, such as makingOption<Path<_>>
equivalent to the currentOptionalPath
from axum-extra. If you feel like this is worth exploring, I can open an issue.This idea originally came up in #2281 (reply in thread).
The text was updated successfully, but these errors were encountered: