pub enum ErrorType {
Show 40 variants InputTooLarge, BadKeyType, EarlyEnd, ExpectedArray, ExpectedArrayComma, ExpectedBoolean, ExpectedEnum, ExpectedFloat, ExpectedInteger, ExpectedMap, ExpectedObjectColon, ExpectedMapComma, ExpectedMapEnd, ExpectedNull, ExpectedNumber, ExpectedSigned, ExpectedString, ExpectedUnsigned, InternalError, InvalidEscape, InvalidExponent, InvalidNumber, InvalidUtf8, InvalidUnicodeEscape, InvalidUnicodeCodepoint, KeyMustBeAString, NoStructure, Parser, Eof, Serde(String), Syntax, TrailingCharacters, UnexpectedCharacter, UnexpectedEnd, UnterminatedString, ExpectedArrayContent, ExpectedObjectContent, ExpectedObjectKey, Overflow, Io(Error),
}
Expand description

Error types encountered while parsing

Variants

InputTooLarge

Simd-json only supports inputs of up to 4GB in size.

BadKeyType

The key of a map isn’t a string

EarlyEnd

The data ended early

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

ExpectedNumber

Expected a number

ExpectedSigned

Expected a signed number

ExpectedString

Expected a string

ExpectedUnsigned

Expected an unsigned number

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

TrailingCharacters

Training characters

UnexpectedCharacter

Unexpected character

UnexpectedEnd

Unexpected end

UnterminatedString

Unterminated string

ExpectedArrayContent

Expected Array elements

ExpectedObjectContent

Expected Object elements

ExpectedObjectKey

Expected Object Key

Overflow

Overflow of a limited buffer

Io(Error)

IO error

Trait Implementations

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.