pub enum Reason {
ExpectedNumber,
ExpectedString,
ExpectedBool,
ExpectedNull,
UnexpectedCtrlChar,
InvalidUtf8,
InvalidEscapeCode,
UnexpectedEof,
UnexpectedChar,
NonBlockingRead,
CouldNotRewindInput(ErrorKind),
UnrecognizedIoError(ErrorKind),
}
Expand description
All the possible reasons parsing json might fail
Variants§
ExpectedNumber
Failed to parse what looked like a number
ExpectedString
Failed to parse what looked like a string
ExpectedBool
Failed to parse what looked like a boolean
ExpectedNull
Failed to parse what looked like a null
UnexpectedCtrlChar
Unexpected control character in string
InvalidUtf8
Encountered an invalid unicode/utf8 sequence while parsing a string
InvalidEscapeCode
Invalid escape escape code in string
UnexpectedEof
Unexpectedly reached end of file. Json is malformed
UnexpectedChar
A character was not recognized as being part of a valid json construct
NonBlockingRead
The read implementation was non-blocking, which is not supported
CouldNotRewindInput(ErrorKind)
Failed to rewind a Seek
able input.
UnrecognizedIoError(ErrorKind)
An unrecognized io-related error occured
Trait Implementations§
impl Copy for Reason
impl Eq for Reason
impl StructuralPartialEq for Reason
Auto Trait Implementations§
impl Freeze for Reason
impl RefUnwindSafe for Reason
impl Send for Reason
impl Sync for Reason
impl Unpin for Reason
impl UnwindSafe for Reason
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