#[non_exhaustive]pub enum ExtractUrlEncodedBodyError {
MissingContentType(MissingUrlEncodedContentType),
ContentTypeMismatch(UrlEncodedContentTypeMismatch),
DeserializationError(UrlEncodedBodyDeserializationError),
}
Expand description
The error returned by UrlEncodedBody::extract
when the extraction fails.
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.
MissingContentType(MissingUrlEncodedContentType)
See MissingUrlEncodedContentType
for details.
ContentTypeMismatch(UrlEncodedContentTypeMismatch)
See UrlEncodedContentTypeMismatch
for details.
DeserializationError(UrlEncodedBodyDeserializationError)
See UrlEncodedBodyDeserializationError
for details.
Implementations§
source§impl ExtractUrlEncodedBodyError
impl ExtractUrlEncodedBodyError
sourcepub fn into_response(&self) -> Response
pub fn into_response(&self) -> Response
Convert an ExtractUrlEncodedBodyError
into an HTTP response.
Trait Implementations§
source§impl Debug for ExtractUrlEncodedBodyError
impl Debug for ExtractUrlEncodedBodyError
source§impl Display for ExtractUrlEncodedBodyError
impl Display for ExtractUrlEncodedBodyError
source§impl Error for ExtractUrlEncodedBodyError
impl Error for ExtractUrlEncodedBodyError
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 From<MissingUrlEncodedContentType> for ExtractUrlEncodedBodyError
impl From<MissingUrlEncodedContentType> for ExtractUrlEncodedBodyError
source§fn from(source: MissingUrlEncodedContentType) -> Self
fn from(source: MissingUrlEncodedContentType) -> Self
Converts to this type from the input type.
source§impl From<UrlEncodedBodyDeserializationError> for ExtractUrlEncodedBodyError
impl From<UrlEncodedBodyDeserializationError> for ExtractUrlEncodedBodyError
source§fn from(source: UrlEncodedBodyDeserializationError) -> Self
fn from(source: UrlEncodedBodyDeserializationError) -> Self
Converts to this type from the input type.
source§impl From<UrlEncodedContentTypeMismatch> for ExtractUrlEncodedBodyError
impl From<UrlEncodedContentTypeMismatch> for ExtractUrlEncodedBodyError
source§fn from(source: UrlEncodedContentTypeMismatch) -> Self
fn from(source: UrlEncodedContentTypeMismatch) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ExtractUrlEncodedBodyError
impl RefUnwindSafe for ExtractUrlEncodedBodyError
impl Send for ExtractUrlEncodedBodyError
impl Sync for ExtractUrlEncodedBodyError
impl Unpin for ExtractUrlEncodedBodyError
impl UnwindSafe for ExtractUrlEncodedBodyError
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