pub enum JsonError {
BodyAlreadyExtracted,
WrongContentType,
IoError(Error),
ParseError(Error),
}
Expand description
Error that can happen when parsing the JSON input.
Variants§
BodyAlreadyExtracted
Can’t parse the body of the request because it was already extracted.
WrongContentType
Wrong content type.
IoError(Error)
Could not read the body from the request. Also happens if the body is not valid UTF-8.
ParseError(Error)
Error while parsing.
Trait Implementations§
Source§impl Error for JsonError
impl Error for JsonError
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()
Auto Trait Implementations§
impl Freeze for JsonError
impl !RefUnwindSafe for JsonError
impl Send for JsonError
impl Sync for JsonError
impl Unpin for JsonError
impl !UnwindSafe for JsonError
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