pub enum JsonErrorKind {
UnexpectedEnd,
UnexpectedCharacter {
found: char,
},
UnterminatedString,
UnterminatedComment,
InvalidEscape,
InvalidNumber,
DuplicateKey {
name: String,
},
TrailingContent,
DepthExceeded,
}Expand description
The reason a JSON or JSON5 document failed to parse.
Variants§
UnexpectedEnd
The input ended inside a value.
UnexpectedCharacter
A character cannot start or continue the current construct.
UnterminatedString
A string has no closing quote before the end of its line or the input.
UnterminatedComment
A block comment has no closing delimiter.
InvalidEscape
A string or identifier escape sequence is malformed or cannot be decoded.
InvalidNumber
A number literal is malformed.
DuplicateKey
An object has two members with the same decoded key.
TrailingContent
Content follows the root value.
DepthExceeded
Arrays and objects are nested deeper than the parser allows.
Trait Implementations§
Source§impl Clone for JsonErrorKind
impl Clone for JsonErrorKind
Source§fn clone(&self) -> JsonErrorKind
fn clone(&self) -> JsonErrorKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonErrorKind
impl Debug for JsonErrorKind
Source§impl Display for JsonErrorKind
impl Display for JsonErrorKind
impl Eq for JsonErrorKind
Source§impl Error for JsonErrorKind
impl Error for JsonErrorKind
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()
Source§impl PartialEq for JsonErrorKind
impl PartialEq for JsonErrorKind
impl StructuralPartialEq for JsonErrorKind
Auto Trait Implementations§
impl Freeze for JsonErrorKind
impl RefUnwindSafe for JsonErrorKind
impl Send for JsonErrorKind
impl Sync for JsonErrorKind
impl Unpin for JsonErrorKind
impl UnsafeUnpin for JsonErrorKind
impl UnwindSafe for JsonErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.