Enum actix_multipart::MultipartError
source · #[non_exhaustive]pub enum MultipartError {
}
Expand description
A set of errors that can occur during parsing multipart streams.
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.
NoContentDisposition
Content-Disposition header is not found or is not equal to “form-data”.
According to RFC 7578 §4.2 a Content-Disposition header must always be present and equal to “form-data”.
NoContentType
Content-Type header is not found
ParseContentType
Can not parse Content-Type header
Boundary
Multipart boundary is not found
Nested
Nested multipart is not supported
Incomplete
Multipart stream is incomplete
Parse(ParseError)
Error during field parsing
Payload(PayloadError)
Payload error
NotConsumed
Not consumed
Field
An error from a field handler in a form
DuplicateField(String)
Duplicate field
MissingField(String)
Missing field
UnsupportedField(String)
Unknown field
Trait Implementations§
source§impl Debug for MultipartError
impl Debug for MultipartError
source§impl Display for MultipartError
impl Display for MultipartError
source§impl Error for MultipartError
impl Error for MultipartError
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<(String, Error)> for MultipartError
impl From<(String, Error)> for MultipartError
source§fn from(original: (String, Error)) -> MultipartError
fn from(original: (String, Error)) -> MultipartError
Converts to this type from the input type.
source§impl From<ParseError> for MultipartError
impl From<ParseError> for MultipartError
source§fn from(original: ParseError) -> MultipartError
fn from(original: ParseError) -> MultipartError
Converts to this type from the input type.
source§impl From<PayloadError> for MultipartError
impl From<PayloadError> for MultipartError
source§fn from(original: PayloadError) -> MultipartError
fn from(original: PayloadError) -> MultipartError
Converts to this type from the input type.
source§impl ResponseError for MultipartError
impl ResponseError for MultipartError
Return BadRequest
for MultipartError
source§fn status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Returns appropriate status code for error. Read more
§fn error_response(&self) -> HttpResponse
fn error_response(&self) -> HttpResponse
Creates full response for error. Read more
Auto Trait Implementations§
impl !Freeze for MultipartError
impl !RefUnwindSafe for MultipartError
impl !Send for MultipartError
impl !Sync for MultipartError
impl Unpin for MultipartError
impl !UnwindSafe for MultipartError
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