pub enum MultipartError {
NoContentType,
ParseContentType,
Boundary,
Nested,
Incomplete,
Decode(DecodeError),
Payload(PayloadError),
NotConsumed,
}
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
Boundary
Multipart boundary is not found
Nested
Nested multipart is not supported
Incomplete
Multipart stream is incomplete
Decode(DecodeError)
Error during field parsing
Payload(PayloadError)
Payload error
NotConsumed
Not consumed
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
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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<DecodeError> for MultipartError
impl From<DecodeError> for MultipartError
Source§fn from(original: DecodeError) -> MultipartError
fn from(original: DecodeError) -> 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 WebResponseError for MultipartError
Return BadRequest
for MultipartError
impl WebResponseError for MultipartError
Return BadRequest
for MultipartError
Source§fn status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Response’s status code Read more
Source§fn error_response(&self, _: &HttpRequest) -> Response
fn error_response(&self, _: &HttpRequest) -> Response
Generate 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