pub enum LexerErrorDetails {
Show 15 variants
InvalidFile,
ZeroLengthInput,
EndOfInput,
StreamFailure,
NonUtf8InputDetected,
UnexpectedToken(Token),
PairExpected,
InvalidRootObject,
InvalidObject,
InvalidArray,
InvalidCharacter(char),
MatchFailed(String, String),
InvalidNumericRepresentation(String),
InvalidEscapeSequence(String),
InvalidUnicodeEscapeSequence(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(Token)
Edge case error condition. This means that something has gone horribly wrong with the parse.
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.
Trait Implementations§
Source§impl Clone for LexerErrorDetails
impl Clone for LexerErrorDetails
Source§fn clone(&self) -> LexerErrorDetails
fn clone(&self) -> LexerErrorDetails
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more