#[non_exhaustive]pub enum Error {
Show 15 variants
UnknownField {
field_name: Option<String>,
},
IncompleteFieldData {
field_name: Option<String>,
},
IncompleteHeaders,
ReadHeaderFailed(Error),
DecodeHeaderName {
name: String,
cause: Box<dyn Error + Send + Sync>,
},
DecodeHeaderValue {
value: Vec<u8>,
cause: Box<dyn Error + Send + Sync>,
},
IncompleteStream,
FieldSizeExceeded {
limit: u64,
field_name: Option<String>,
},
StreamSizeExceeded {
limit: u64,
},
StreamReadFailed(Box<dyn Error + Send + Sync>),
LockFailure,
NoMultipart,
DecodeContentType(FromStrError),
NoBoundary,
DecodeJson(Error),
}
Expand description
A set of errors that can occur during parsing multipart stream and in other operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownField
An unknown field is detected when multipart
constraints
are added.
IncompleteFieldData
The field data is found incomplete.
IncompleteHeaders
Couldn’t read the field headers completely.
ReadHeaderFailed(Error)
Failed to read headers.
DecodeHeaderName
Failed to decode the field’s raw header name to
HeaderName
type.
DecodeHeaderValue
Failed to decode the field’s raw header value to
HeaderValue
type.
IncompleteStream
Multipart stream is incomplete.
FieldSizeExceeded
The incoming field size exceeded the maximum limit.
StreamSizeExceeded
The incoming stream size exceeded the maximum limit.
StreamReadFailed(Box<dyn Error + Send + Sync>)
Stream read failed.
LockFailure
Failed to lock the multipart shared state for any changes.
NoMultipart
The Content-Type
header is not multipart/form-data
.
DecodeContentType(FromStrError)
Failed to convert the Content-Type
to mime::Mime
type.
NoBoundary
No boundary found in Content-Type
header.
DecodeJson(Error)
json
only.Failed to decode the field data as JSON
in
field.json()
method.