pub enum DecodeError {
EndOfInput,
Expected(&'static str),
MaxRecursion,
IntOverflow,
Unexpected(char),
UnicodeEscape,
Number,
BufferOverflow,
Message(&'static str),
Other(Box<dyn Error + Send + Sync>),
}
Variants§
EndOfInput
The underlying iterator stopped giving us new values.
Expected(&'static str)
An expectation was not met while decoding.
MaxRecursion
During generic JSON decoding too many nesting levels had
been encountered. See Config
for details.
IntOverflow
When decoding integer values, the actual JSON digits exceeded the possible value range.
Unexpected(char)
An unexpected character was encountered.
UnicodeEscape
An invalid unicode escape sequence was found when decoding a JSON string.
Number
Decoding a numeric value failed.
BufferOverflow
A JSON string did not fit into the provided Utf8Buffer
.
Message(&'static str)
Generic error message.
Other(Box<dyn Error + Send + Sync>)
Some other Error
trait impl.
Trait Implementations§
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Auto Trait Implementations§
impl Freeze for DecodeError
impl !RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl !UnwindSafe for DecodeError
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