pub enum ParseError {
Show 13 variants
TokenizerError,
ScratchBufferFull,
InvalidUtf8(Utf8Error),
InvalidNumber,
UnexpectedState(&'static str),
EndOfData,
InvalidUnicodeHex,
InvalidUnicodeCodepoint,
InvalidEscapeSequence,
FloatNotAllowed,
TokenTooLarge {
token_size: usize,
buffer_size: usize,
suggestion: &'static str,
},
EndOfStream,
ReaderError,
}Expand description
Errors that can occur during JSON parsing
Variants§
TokenizerError
An error bubbled up from the underlying tokenizer.
ScratchBufferFull
The provided scratch buffer was not large enough for an operation.
InvalidUtf8(Utf8Error)
A string slice was not valid UTF-8.
InvalidNumber
A number string could not be parsed.
UnexpectedState(&'static str)
The parser entered an unexpected internal state.
EndOfData
End of input data.
InvalidUnicodeHex
Invalid hex digits in Unicode escape sequence.
InvalidUnicodeCodepoint
Valid hex but invalid Unicode codepoint.
InvalidEscapeSequence
Invalid escape sequence character.
FloatNotAllowed
Float encountered but float support is disabled and float-error is configured
TokenTooLarge
A JSON token was too large to fit in the available buffer space
EndOfStream
End of input stream was reached unexpectedly
ReaderError
Error from the underlying reader (I/O error, not end-of-stream)
Trait Implementations§
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl From<Utf8Error> for ParseError
impl From<Utf8Error> for ParseError
Source§impl PartialEq for ParseError
impl PartialEq for ParseError
impl StructuralPartialEq for ParseError
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
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