Enum simd_json::ErrorType

source ·
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

Trait Implementations§

source§

impl Debug for ErrorType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for ErrorType

source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.