You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have looked for existing issues (including closed) about this
Feature Request
Motivation
Optional extractors don't need the rejection to implement IntoResponse. Providing an extraction with a Rejection that doesn't implement IntoResponse will indicate this extractor must be used as optional.
This is a required feature for enforcing certain response shapes via the type system.
Proposal
Make the following changes (simplified):
pub trait FromRequestParts<S>: Sized {
- type Rejection: IntoResponse;+ type Rejection;
pub trait FromRequest<S, M = private::ViaRequest>: Sized { {
- type Rejection: IntoResponse;+ type Rejection;
Alternatives
The text was updated successfully, but these errors were encountered:
MOZGIII
changed the title
Drop IntoResponse trait requirement from FromRequestParts and FromRequest
Drop IntoResponse trait requirement from FromRequestParts and FromRequest Rejections
Aug 8, 2024
Feature Request
Motivation
Optional extractors don't need the rejection to implement
IntoResponse
. Providing an extraction with aRejection
that doesn't implementIntoResponse
will indicate this extractor must be used as optional.Proposal
Make the following changes (simplified):
Alternatives
The text was updated successfully, but these errors were encountered: