pub enum JsonDecodeErrorKind {
Budget,
EmptyInput,
InvalidUtf8,
InvalidJson,
UnexpectedTopLevel,
Deserialize,
}Expand description
Represents the coarse category of a JSON decoding failure.
This exhaustive enum is the stable branching contract shared by strict and normalizing decoders.
§Examples
use qubit_json::decode::JsonDecodeErrorKind;
let kind = "invalid_json".parse::<JsonDecodeErrorKind>()?;
assert_eq!(kind, JsonDecodeErrorKind::InvalidJson);Variants§
Budget
A configured resource budget rejected a measurement.
EmptyInput
Normalization produced no JSON document from the supplied input.
InvalidUtf8
Raw byte input was not valid UTF-8.
InvalidJson
Input was not one valid JSON document under the numeric contract.
UnexpectedTopLevel
A valid document had an unexpected top-level kind.
Deserialize
A valid admitted document could not deserialize into the target type.
Trait Implementations§
Source§impl Clone for JsonDecodeErrorKind
impl Clone for JsonDecodeErrorKind
Source§fn clone(&self) -> JsonDecodeErrorKind
fn clone(&self) -> JsonDecodeErrorKind
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 moreimpl Copy for JsonDecodeErrorKind
Source§impl Debug for JsonDecodeErrorKind
impl Debug for JsonDecodeErrorKind
Source§impl Display for JsonDecodeErrorKind
impl Display for JsonDecodeErrorKind
impl Eq for JsonDecodeErrorKind
Source§impl FromStr for JsonDecodeErrorKind
impl FromStr for JsonDecodeErrorKind
Source§impl Hash for JsonDecodeErrorKind
impl Hash for JsonDecodeErrorKind
Source§impl PartialEq for JsonDecodeErrorKind
impl PartialEq for JsonDecodeErrorKind
impl StructuralPartialEq for JsonDecodeErrorKind
Auto Trait Implementations§
impl Freeze for JsonDecodeErrorKind
impl RefUnwindSafe for JsonDecodeErrorKind
impl Send for JsonDecodeErrorKind
impl Sync for JsonDecodeErrorKind
impl Unpin for JsonDecodeErrorKind
impl UnsafeUnpin for JsonDecodeErrorKind
impl UnwindSafe for JsonDecodeErrorKind
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