#[non_exhaustive]pub enum GenericRejectionError {
BodyCollectionError,
InvalidContentType,
}Available on crate feature
server only.Expand description
Generic rejection Errors
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BodyCollectionError
Failed to collect the Body
InvalidContentType
The Content-Type is invalid for the extractor
Implementations§
Source§impl GenericRejectionError
impl GenericRejectionError
Sourcepub fn to_status_code(&self) -> StatusCode
pub fn to_status_code(&self) -> StatusCode
Convert the GenericRejectionError to the corresponding StatusCode
Trait Implementations§
Source§impl Debug for GenericRejectionError
impl Debug for GenericRejectionError
Source§impl Display for GenericRejectionError
impl Display for GenericRejectionError
Source§impl Error for GenericRejectionError
impl Error for GenericRejectionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl IntoResponse for GenericRejectionError
impl IntoResponse for GenericRejectionError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Consume self and convert it into a
ResponseAuto Trait Implementations§
impl Freeze for GenericRejectionError
impl RefUnwindSafe for GenericRejectionError
impl Send for GenericRejectionError
impl Sync for GenericRejectionError
impl Unpin for GenericRejectionError
impl UnwindSafe for GenericRejectionError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more