#[non_exhaustive]pub enum TypedMultipartError {
InvalidRequest {
source: MultipartRejection,
},
InvalidRequestBody {
source: MultipartError,
},
MissingField {
field_name: String,
},
WrongFieldType {
field_name: String,
wanted_type: String,
source: Error,
},
DuplicateField {
field_name: String,
},
UnknownField {
field_name: String,
},
NamelessField,
FieldTooLarge {
field_name: String,
limit_bytes: usize,
},
Other {
source: Error,
},
}
Expand description
Error type for the TryFromMultipart trait.
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.
InvalidRequest
Fields
§
source: MultipartRejection
InvalidRequestBody
Fields
§
source: MultipartError
MissingField
WrongFieldType
DuplicateField
UnknownField
NamelessField
FieldTooLarge
Other
Implementations§
source§impl TypedMultipartError
impl TypedMultipartError
pub fn get_status(&self) -> StatusCode
Trait Implementations§
source§impl Debug for TypedMultipartError
impl Debug for TypedMultipartError
source§impl Display for TypedMultipartError
impl Display for TypedMultipartError
source§impl Error for TypedMultipartError
impl Error for TypedMultipartError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for TypedMultipartError
impl From<Error> for TypedMultipartError
source§impl From<MultipartError> for TypedMultipartError
impl From<MultipartError> for TypedMultipartError
source§fn from(source: MultipartError) -> Self
fn from(source: MultipartError) -> Self
Converts to this type from the input type.
source§impl From<MultipartRejection> for TypedMultipartError
impl From<MultipartRejection> for TypedMultipartError
source§fn from(source: MultipartRejection) -> Self
fn from(source: MultipartRejection) -> Self
Converts to this type from the input type.
source§impl IntoResponse for TypedMultipartError
impl IntoResponse for TypedMultipartError
source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl !RefUnwindSafe for TypedMultipartError
impl Send for TypedMultipartError
impl Sync for TypedMultipartError
impl Unpin for TypedMultipartError
impl !UnwindSafe for TypedMultipartError
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