ErrorResponse can't be used as Rejection type #1448
Labels
A-axum-core
C-bug
Category: This is a bug.
P-low
Low priority
S-blocked
Status: marked as blocked ❌ on something else such as a PR or other implementation work.
Because
ErrorResponse
doesn't implementIntoResponse
(it can't, insteadResult<impl IntoResponse, ErrorResponse
does), it can't be used astype Rejection
of aFromRequest(Parts)
implementation. I think we could fix this by removing theIntoResponse
bound ontype Rejection
in the trait implementation and instead addingwhere Result<Self, Self::Rejection>: IntoResponse
to the trait definition, but I'm also pretty sure that that bound then won't be implied byT: FromRequest
and you'll have to drag it along everywhere you want to be generic overFromRequest
.Just wanted this documented, and might try it out again / find the relevant rustc issue.
The text was updated successfully, but these errors were encountered: