pub enum ParserErrorDetails {
Show 17 variants
InvalidFile,
ZeroLengthInput,
EndOfInput,
StreamFailure,
NonUtf8InputDetected,
UnexpectedToken(String),
ValueExpected,
PairExpected,
InvalidRootObject,
InvalidObject,
InvalidArray,
InvalidCharacter(char),
MatchFailed(String, String),
InvalidNumericRepresentation(String),
InvalidEscapeSequence(String),
InvalidUnicodeEscapeSequence(String),
LexerError(String),
}
Expand description
A global enumeration of error codes
Variants§
InvalidFile
An invalid file has been specified. It might not exist, or might not be accessible
ZeroLengthInput
We can’t parse nothing.
EndOfInput
End of input has been reached. This is used as a stopping condition at various points.
StreamFailure
If pulling bytes from an underlying stream (or [BufRead]) of some description, and an error occurs, this will be returned.
NonUtf8InputDetected
Dodgy UTF8 has been found in the input.
UnexpectedToken(String)
Edge case error condition. This means that something has gone horribly wrong with the parse.
ValueExpected
An array value is expected but not detected
PairExpected
KV pair is expected but not detected.
InvalidRootObject
Supplied JSON doesn’t have an object or array as a root object.
InvalidObject
The parse of an object has failed.
InvalidArray
The parse of an array has failed.
InvalidCharacter(char)
An invalid character has been detected within the input.
MatchFailed(String, String)
Whilst looking for a literal string token (null, true, false) a match couldn’t be found
InvalidNumericRepresentation(String)
A number has been found with an incorrect string representation.
InvalidEscapeSequence(String)
An invalid escape sequence has been found within the input.
InvalidUnicodeEscapeSequence(String)
An invalid unicode escape sequence (\uXXX) has been found within the input.
LexerError(String)
A bubbled error from the lexical analysis backend
Trait Implementations§
Source§impl Clone for ParserErrorDetails
impl Clone for ParserErrorDetails
Source§fn clone(&self) -> ParserErrorDetails
fn clone(&self) -> ParserErrorDetails
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more