Enum json_with_comments::error::SyntaxError
source · 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
UnexpectedTokenWhileStartParsingString
UnexpectedTokenWhileStartParsingBytes
UnexpectedTokenWhileParsingString
UnexpectedTokenWhileEndParsingString
UnexpectedTokenWhileStartParsingEscapeSequence
UnexpectedTokenWhileStartParsingNumber
UnexpectedTokenWhileParsingBool
UnexpectedTokenWhileParsingNull
UnexpectedTokenWhileStartParsingObject
UnexpectedTokenWhileEndParsingObject
UnexpectedTokenWhileParsingObjectKey
UnexpectedTokenWhileStartParsingObjectValue
UnexpectedTokenWhileEndParsingObjectValue
UnexpectedTokenWhileStartParsingArray
UnexpectedTokenWhileEndParsingArray
UnexpectedTokenWhileParsingArrayValue
UnexpectedTokenWhileStartParsingEnum
UnexpectedTokenWhileEndParsingEnum
UnexpectedTokenWhileStartParsingEnumValue
UnexpectedTokenWhileStartParsingComment
UnexpectedTokenWhileEndParsingComment
EofWhileStartParsingValue
EofWhileStartParsingString
EofWhileEndParsingString
EofWhileStartParsingBytes
EofWhileParsingEscapeSequence
EofWhileStartParsingNumber
EofWhileStartParsingFraction
EofWhileStartParsingExponent
EofWhileParsingNumber
EofWhileStartParsingBool
EofWhileStartParsingNull
EofWhileStartParsingObject
EofWhileEndParsingObject
EofWhileParsingObjectKey
EofWhileParsingObjectValue
EofWhileStartParsingArray
EofWhileEndParsingArray
EofWhileParsingIdent
EofWhileStartParsingEnum
EofWhileEndParsingEnum
EofWhileStartParsingComment
UnexpectedIdent
ExpectedEof
ControlCharacterWhileParsingString
InvalidEscapeSequence
InvalidUnicodeEscape
CannotConvertChar
InvalidLeadingPlus
InvalidLeadingZeros
MissingExponent
MissingFraction
UnterminatedComment
Trait Implementations§
source§impl Debug for SyntaxError
impl Debug for SyntaxError
source§impl Display for SyntaxError
impl Display for SyntaxError
source§impl Error for SyntaxError
impl Error for SyntaxError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<SyntaxError> for JsonWithCommentsError
impl From<SyntaxError> for JsonWithCommentsError
source§fn from(err: SyntaxError) -> Self
fn from(err: SyntaxError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for SyntaxError
impl Send for SyntaxError
impl Sync for SyntaxError
impl Unpin for SyntaxError
impl UnwindSafe for SyntaxError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more