#[non_exhaustive]
pub enum Error {
Show 14 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,
}
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
Fields
limit: u64
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.
Trait Implementations
sourceimpl Error for Error
impl Error for Error
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl Eq for Error
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more