#[non_exhaustive]pub enum JsonDecodeContext {
Value,
ObjectKey,
String,
Number,
Colon,
ArraySeparator,
ObjectSeparator,
TrailingInput,
}Expand description
Grammar location where a validated decode failure occurred.
§Examples
use qubit_json::decode::JsonDecodeContext;
let context = JsonDecodeContext::ObjectKey;
assert_eq!(context, JsonDecodeContext::ObjectKey);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.
Value
A JSON value token was expected.
ObjectKey
An object key token was expected.
String
A string token was being scanned.
Number
A number token was being scanned or projected.
Colon
An object colon was expected.
ArraySeparator
An array separator or closing bracket was expected.
ObjectSeparator
An object separator or closing brace was expected.
TrailingInput
The document had trailing input after its root value.
Trait Implementations§
Source§impl Clone for JsonDecodeContext
impl Clone for JsonDecodeContext
impl Copy for JsonDecodeContext
Source§impl Debug for JsonDecodeContext
impl Debug for JsonDecodeContext
impl Eq for JsonDecodeContext
Source§impl Hash for JsonDecodeContext
impl Hash for JsonDecodeContext
Source§impl PartialEq for JsonDecodeContext
impl PartialEq for JsonDecodeContext
impl StructuralPartialEq for JsonDecodeContext
Auto Trait Implementations§
impl Forget for JsonDecodeContext
impl Freeze for JsonDecodeContext
impl RefUnwindSafe for JsonDecodeContext
impl Send for JsonDecodeContext
impl Sync for JsonDecodeContext
impl Unpin for JsonDecodeContext
impl UnsafeUnpin for JsonDecodeContext
impl UnwindSafe for JsonDecodeContext
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