pub enum PayloadError {
Http(HttpError),
Payload(PayloadError),
ContentType(ContentTypeError),
Decoding,
}Expand description
Errors that can occur while reading a request payload.
Returned by the Bytes and String extractors and by the Payload stream.
Variants§
Http(HttpError)
Http error.
Payload(PayloadError)
Error while reading the payload stream.
ContentType(ContentTypeError)
Invalid content type or charset.
Decoding
The body cannot be decoded with the request’s charset.
Trait Implementations§
Source§impl Debug for PayloadError
impl Debug for PayloadError
Source§impl Display for PayloadError
impl Display for PayloadError
Source§impl Error for PayloadError
impl Error for PayloadError
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<ContentTypeError> for PayloadError
impl From<ContentTypeError> for PayloadError
Source§fn from(source: ContentTypeError) -> Self
fn from(source: ContentTypeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for PayloadError
impl From<Error> for PayloadError
Source§impl From<PayloadError> for PayloadError
impl From<PayloadError> for PayloadError
Source§fn from(source: PayloadError) -> Self
fn from(source: PayloadError) -> Self
Converts to this type from the input type.
Source§impl<St> WebResponseError<St, DefaultError> for PayloadError
impl<St> WebResponseError<St, DefaultError> for PayloadError
Source§fn error_response(&self, _: &St) -> HttpResponse
fn error_response(&self, _: &St) -> HttpResponse
Generate response for error Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PayloadError
impl !UnwindSafe for PayloadError
impl Freeze for PayloadError
impl Send for PayloadError
impl Sync for PayloadError
impl Unpin for PayloadError
impl UnsafeUnpin for PayloadError
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