pub enum SyntaxError {
Show 54 variants UnexpectedTokenWhileParsingValue { pos: Position, found: u8, }, UnexpectedTokenWhileStartParsingString { pos: Position, found: u8, }, UnexpectedTokenWhileStartParsingBytes { pos: Position, found: u8, }, UnexpectedTokenWhileParsingString { pos: Position, found: u8, }, UnexpectedTokenWhileEndParsingString { pos: Position, found: u8, }, UnexpectedTokenWhileStartParsingEscapeSequence { pos: Position, found: u8, }, UnexpectedTokenWhileStartParsingNumber { pos: Position, found: u8, }, UnexpectedTokenWhileParsingBool { pos: Position, found: u8, }, UnexpectedTokenWhileParsingNull { pos: Position, found: u8, }, UnexpectedTokenWhileStartParsingObject { pos: Position, found: u8, }, UnexpectedTokenWhileEndParsingObject { pos: Position, found: u8, }, UnexpectedTokenWhileParsingObjectKey { pos: Position, found: u8, }, UnexpectedTokenWhileStartParsingObjectValue { pos: Position, found: u8, }, UnexpectedTokenWhileEndParsingObjectValue { pos: Position, found: u8, }, UnexpectedTokenWhileStartParsingArray { pos: Position, found: u8, }, UnexpectedTokenWhileEndParsingArray { pos: Position, found: u8, }, UnexpectedTokenWhileParsingArrayValue { pos: Position, found: u8, }, UnexpectedTokenWhileStartParsingEnum { pos: Position, found: u8, }, UnexpectedTokenWhileEndParsingEnum { pos: Position, found: u8, }, UnexpectedTokenWhileStartParsingEnumValue { pos: Position, found: u8, }, UnexpectedTokenWhileStartParsingComment { pos: Position, found: u8, }, UnexpectedTokenWhileEndParsingComment { pos: Position, found: u8, }, EofWhileStartParsingValue, EofWhileStartParsingString, EofWhileEndParsingString, EofWhileStartParsingBytes, EofWhileParsingEscapeSequence, EofWhileStartParsingNumber, EofWhileStartParsingFraction, EofWhileStartParsingExponent, EofWhileParsingNumber, EofWhileStartParsingBool, EofWhileStartParsingNull, EofWhileStartParsingObject, EofWhileEndParsingObject, EofWhileParsingObjectKey, EofWhileParsingObjectValue, EofWhileStartParsingArray, EofWhileEndParsingArray, EofWhileParsingIdent, EofWhileStartParsingEnum, EofWhileEndParsingEnum, EofWhileStartParsingComment, UnexpectedIdent { pos: PosRange, expected: Vec<u8>, found: Vec<u8>, }, ExpectedEof { pos: Position, found: u8, }, ControlCharacterWhileParsingString { pos: Position, c: u8, }, InvalidEscapeSequence { pos: Position, found: u8, }, InvalidUnicodeEscape { pos: Position, found: u8, }, CannotConvertChar { pos: Position, char: u32, }, InvalidLeadingPlus { pos: Position, }, InvalidLeadingZeros { pos: Position, }, MissingExponent { pos: Position, found: u8, }, MissingFraction { pos: Position, found: u8, }, UnterminatedComment,
}

Variants§

§

UnexpectedTokenWhileParsingValue

Fields

§found: u8
§

UnexpectedTokenWhileStartParsingString

Fields

§found: u8
§

UnexpectedTokenWhileStartParsingBytes

Fields

§found: u8
§

UnexpectedTokenWhileParsingString

Fields

§found: u8
§

UnexpectedTokenWhileEndParsingString

Fields

§found: u8
§

UnexpectedTokenWhileStartParsingEscapeSequence

Fields

§found: u8
§

UnexpectedTokenWhileStartParsingNumber

Fields

§found: u8
§

UnexpectedTokenWhileParsingBool

Fields

§found: u8
§

UnexpectedTokenWhileParsingNull

Fields

§found: u8
§

UnexpectedTokenWhileStartParsingObject

Fields

§found: u8
§

UnexpectedTokenWhileEndParsingObject

Fields

§found: u8
§

UnexpectedTokenWhileParsingObjectKey

Fields

§found: u8
§

UnexpectedTokenWhileStartParsingObjectValue

Fields

§found: u8
§

UnexpectedTokenWhileEndParsingObjectValue

Fields

§found: u8
§

UnexpectedTokenWhileStartParsingArray

Fields

§found: u8
§

UnexpectedTokenWhileEndParsingArray

Fields

§found: u8
§

UnexpectedTokenWhileParsingArrayValue

Fields

§found: u8
§

UnexpectedTokenWhileStartParsingEnum

Fields

§found: u8
§

UnexpectedTokenWhileEndParsingEnum

Fields

§found: u8
§

UnexpectedTokenWhileStartParsingEnumValue

Fields

§found: u8
§

UnexpectedTokenWhileStartParsingComment

Fields

§found: u8
§

UnexpectedTokenWhileEndParsingComment

Fields

§found: u8
§

EofWhileStartParsingValue

§

EofWhileStartParsingString

§

EofWhileEndParsingString

§

EofWhileStartParsingBytes

§

EofWhileParsingEscapeSequence

§

EofWhileStartParsingNumber

§

EofWhileStartParsingFraction

§

EofWhileStartParsingExponent

§

EofWhileParsingNumber

§

EofWhileStartParsingBool

§

EofWhileStartParsingNull

§

EofWhileStartParsingObject

§

EofWhileEndParsingObject

§

EofWhileParsingObjectKey

§

EofWhileParsingObjectValue

§

EofWhileStartParsingArray

§

EofWhileEndParsingArray

§

EofWhileParsingIdent

§

EofWhileStartParsingEnum

§

EofWhileEndParsingEnum

§

EofWhileStartParsingComment

§

UnexpectedIdent

Fields

§expected: Vec<u8>
§found: Vec<u8>
§

ExpectedEof

Fields

§found: u8
§

ControlCharacterWhileParsingString

Fields

§c: u8
§

InvalidEscapeSequence

Fields

§found: u8
§

InvalidUnicodeEscape

Fields

§found: u8
§

CannotConvertChar

Fields

§char: u32
§

InvalidLeadingPlus

Fields

§

InvalidLeadingZeros

Fields

§

MissingExponent

Fields

§found: u8
§

MissingFraction

Fields

§found: u8
§

UnterminatedComment

Trait Implementations§

source§

impl Debug for SyntaxError

source§

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

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

impl Display for SyntaxError

source§

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

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

impl Error for SyntaxError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<SyntaxError> for JsonWithCommentsError

source§

fn from(err: SyntaxError) -> Self

Converts to this type from the input type.

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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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>,

§

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.