#[non_exhaustive]pub enum ParseCategory {
Io,
Syntax,
Data,
Eof,
}Expand description
Classification of a ParseError / SerializeError failure.
Maps onto the four serde_json::error::Category variants without
re-exporting the third-party enum; the workspace-local enum is what
callers pattern-match on, insulating them from a future JSON-parser
swap.
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.
Io
The error was caused by a failure to read or write bytes on an I/O stream.
Syntax
The error was caused by input that was not syntactically valid JSON.
Data
The error was caused by input data that was semantically incorrect (e.g. a JSON value of the wrong type for the target Rust type).
Eof
The error was caused by prematurely-terminated input.
Trait Implementations§
Source§impl Clone for ParseCategory
impl Clone for ParseCategory
Source§fn clone(&self) -> ParseCategory
fn clone(&self) -> ParseCategory
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 ParseCategory
impl Debug for ParseCategory
impl Eq for ParseCategory
Source§impl From<Category> for ParseCategory
impl From<Category> for ParseCategory
Source§impl Hash for ParseCategory
impl Hash for ParseCategory
Source§impl PartialEq for ParseCategory
impl PartialEq for ParseCategory
Source§fn eq(&self, other: &ParseCategory) -> bool
fn eq(&self, other: &ParseCategory) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ParseCategory
Auto Trait Implementations§
impl Freeze for ParseCategory
impl RefUnwindSafe for ParseCategory
impl Send for ParseCategory
impl Sync for ParseCategory
impl Unpin for ParseCategory
impl UnsafeUnpin for ParseCategory
impl UnwindSafe for ParseCategory
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