pub enum ErrorKind {
UnexpectedEof,
UnterminatedString,
MissingClosingBrace,
MissingClosingBracket,
InvalidCharacter(u8),
InvalidEscape,
MissingColon,
MissingComma,
InvalidValue,
MismatchedBracket,
InvalidStructure,
}Expand description
Types of errors that can occur during parsing
Variants§
UnexpectedEof
Reached end of input while parsing a fragment
UnterminatedString
String was not terminated with a closing quote
MissingClosingBrace
Object missing closing brace }
MissingClosingBracket
Array missing closing bracket ]
InvalidCharacter(u8)
Invalid character encountered in the given context
InvalidEscape
Invalid escape sequence in a string
MissingColon
Missing colon after object key
MissingComma
Missing comma between values
InvalidValue
Invalid value in the current context
MismatchedBracket
Mismatched bracket (e.g., [ closed with })
InvalidStructure
Invalid JSON structure detected
Trait Implementations§
Source§impl Error for ErrorKind
impl Error for ErrorKind
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
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