[][src]Enum multer::Error

pub enum Error {
    UnknownField {
        field_name: Option<String>,
    },
    IncompleteFieldData {
        field_name: Option<String>,
    },
    IncompleteHeaders,
    ReadHeaderFailed(Box<dyn Error + Send + Sync>),
    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(Box<dyn Error + Send + Sync>),
    NoMultipart,
    DecodeContentType(Box<dyn Error + Send + Sync>),
    NoBoundary,
    DecodeJson(Box<dyn Error + Send + Sync>),
    // some variants omitted
}

A set of errors that can occur during parsing multipart stream and in other operations.

Variants

UnknownField

An unknown field is detected when multipart constraints are added.

Fields of UnknownField

field_name: Option<String>
IncompleteFieldData

The field data is found incomplete.

Fields of IncompleteFieldData

field_name: Option<String>
IncompleteHeaders

Couldn't read the field headers completely.

ReadHeaderFailed(Box<dyn Error + Send + Sync>)

Failed to read headers.

DecodeHeaderName

Failed to decode the field's raw header name to HeaderName type.

Fields of DecodeHeaderName

name: Stringcause: Box<dyn Error + Send + Sync>
DecodeHeaderValue

Failed to decode the field's raw header value to HeaderValue type.

Fields of DecodeHeaderValue

value: Vec<u8>cause: Box<dyn Error + Send + Sync>
IncompleteStream

Multipart stream is incomplete.

FieldSizeExceeded

The incoming field size exceeded the maximum limit.

Fields of FieldSizeExceeded

limit: u64field_name: Option<String>
StreamSizeExceeded

The incoming stream size exceeded the maximum limit.

Fields of StreamSizeExceeded

limit: u64
StreamReadFailed(Box<dyn Error + Send + Sync>)

Stream read failed.

LockFailure(Box<dyn Error + Send + Sync>)

Failed to lock the multipart shared state for any changes.

NoMultipart

The Content-Type header is not multipart/form-data.

DecodeContentType(Box<dyn Error + Send + Sync>)

Failed to convert the Content-Type to mime::Mime type.

NoBoundary

No boundary found in Content-Type header.

DecodeJson(Box<dyn Error + Send + Sync>)

Failed to decode the field data as JSON in field.json() method.

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Eq for Error[src]

impl Error for Error[src]

impl PartialEq<Error> for Error[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.