pub enum ErrorType {
Show 42 variants
Unexpected(Option<ValueType>, Option<ValueType>),
InputTooLarge,
BadKeyType,
ExpectedArray,
ExpectedArrayComma,
ExpectedBoolean,
ExpectedEnum,
ExpectedFloat,
ExpectedInteger,
ExpectedMap,
ExpectedObjectColon,
ExpectedMapComma,
ExpectedMapEnd,
ExpectedNull,
ExpectedTrue,
ExpectedFalse,
ExpectedNumber,
ExpectedSigned,
ExpectedString,
ExpectedUnsigned,
InternalError(InternalError),
InvalidEscape,
InvalidExponent,
InvalidNumber,
InvalidUtf8,
InvalidUnicodeEscape,
InvalidUnicodeCodepoint,
KeyMustBeAString,
NoStructure,
Parser,
Eof,
Serde(String),
Syntax,
TrailingData,
UnexpectedCharacter,
UnterminatedString,
ExpectedArrayContent,
ExpectedObjectContent,
ExpectedObjectKey,
Overflow,
SimdUnsupported,
Io(Error),
}
Expand description
Error types encountered while parsing
Variants§
Unexpected(Option<ValueType>, Option<ValueType>)
A specific type was expected but another one encountered.
InputTooLarge
Simd-json only supports inputs of up to 4GB in size.
BadKeyType
The key of a map isn’t a string
ExpectedArray
Expected an array
ExpectedArrayComma
Expected a ,
in an array
ExpectedBoolean
expected an boolean
ExpectedEnum
Expected an enum
ExpectedFloat
Expected a float
ExpectedInteger
Expected an integer
ExpectedMap
Expected a map
ExpectedObjectColon
Expected an :
to separate key and value in an object
ExpectedMapComma
Expected a ,
in an object
ExpectedMapEnd
Expected the object to end
ExpectedNull
Expected a null
ExpectedTrue
Expected a true
ExpectedFalse
Expected a false
ExpectedNumber
Expected a number
ExpectedSigned
Expected a signed number
ExpectedString
Expected a string
ExpectedUnsigned
Expected an unsigned number
InternalError(InternalError)
Internal error
InvalidEscape
Invalid escape sequence
InvalidExponent
Invalid exponent in a floating point number
InvalidNumber
Invalid number
InvalidUtf8
Invalid UTF8 codepoint
InvalidUnicodeEscape
Invalid Unicode escape sequence
InvalidUnicodeCodepoint
Invalid Unicode codepoint
KeyMustBeAString
Object Key isn’t a string
NoStructure
Non structural character
Parser
Parser Error
Eof
Early End Of File
Serde(String)
Generic serde error
Syntax
Generic syntax error
TrailingData
Trailing data
UnexpectedCharacter
Unexpected character
UnterminatedString
Unterminated string
ExpectedArrayContent
Expected Array elements
ExpectedObjectContent
Expected Object elements
ExpectedObjectKey
Expected Object Key
Overflow
Overflow of a limited buffer
SimdUnsupported
No SIMD support detected during runtime
Io(Error)
IO error