#[non_exhaustive]pub enum ErrorKind {
End,
Expected(&'static str),
ControlCharacter,
Escape,
Surrogate,
Utf8,
Number,
TooDeep,
Trailing,
}Expand description
Why the bytes are not JSON.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
End
The input ended inside a value.
Expected(&'static str)
A byte the grammar does not allow here. It names what was expected, such as “, or }”.
ControlCharacter
A byte below 0x20 inside a string. JSON needs it escaped.
Escape
A backslash followed by anything but " \ / b f n r t u, or \u without four hex digits.
Surrogate
A \u escape of half a surrogate pair, with no other half.
Utf8
Bytes that are not UTF-8.
Number
A number outside JSON’s grammar, such as -, 1. or 1e.
TooDeep
Arrays and objects nested deeper than the cursor’s depth limit.
Trailing
Bytes after the value, other than whitespace.
Trait Implementations§
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Forget for ErrorKind
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