pub enum MultipartError {
Show 16 variants
NoContentType,
ParseContentType,
IncompatibleContentType,
Boundary,
ContentDispositionMissing,
ContentDispositionNameMissing,
Nested,
Incomplete,
Decode(DecodeError),
Payload(PayloadError),
NotConsumed,
Field {
name: String,
source: Error,
},
DuplicateField(String),
MissingField(String),
UnknownField(String),
Blocking(BlockingError),
}Expand description
A set of errors that can occur during parsing multipart streams
Variants§
NoContentType
Content-Type header is not found
ParseContentType
Can not parse Content-Type header
IncompatibleContentType
Parsed Content-Type did not have “multipart” top-level media type.
Boundary
Multipart boundary is not found
ContentDispositionMissing
Content-Disposition header was not found or not of disposition type “form-data” when parsing a “form-data” field.
ContentDispositionNameMissing
Content-Disposition name parameter was not found when parsing a “form-data” field.
Nested
Nested multipart is not supported
Incomplete
Multipart stream is incomplete
Decode(DecodeError)
Error during field parsing
Payload(PayloadError)
Payload error
NotConsumed
Not consumed
Field
Form field handler raised error.
DuplicateField(String)
Duplicate field found (for structure that opted-in to denying duplicate fields).
MissingField(String)
Required field is missing.
UnknownField(String)
Unknown field (for structure that opted-in to denying unknown fields).
Blocking(BlockingError)
Blocking error
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<BlockingError> for MultipartError
impl From<BlockingError> for MultipartError
Source§fn from(value: BlockingError) -> Self
fn from(value: BlockingError) -> Self
Source§impl From<DecodeError> for MultipartError
impl From<DecodeError> for MultipartError
Source§fn from(value: DecodeError) -> Self
fn from(value: DecodeError) -> Self
Source§impl From<PayloadError> for MultipartError
impl From<PayloadError> for MultipartError
Source§fn from(value: PayloadError) -> Self
fn from(value: PayloadError) -> Self
Source§impl WebResponseError for MultipartError
Return BadRequest for MultipartError
impl WebResponseError for MultipartError
Return BadRequest for MultipartError