pub enum JSONParsingError {
CannotParseArray,
CannotParseFloat,
CannotParseInteger,
CannotParseObject,
CannotParseString,
KeyNotFound,
UnexpectedToken,
EndOfStream,
}
Expand description
Errors while parsing JSON
Due to the “scan once” philosophy of this crate, errors can either be returned when first
constructing a JSONValue
or when trying to read it using one of the accessors.
Variants§
CannotParseArray
Attempt to parse an object that is not an array as an array
CannotParseFloat
Attempt to parse an object that is not a float as a float
CannotParseInteger
Attempt to parse an object that is not an integer as an integer
CannotParseObject
Attempt to parse an object that is not an object as an object
CannotParseString
Attempt to parse an object that is not a string as an string
KeyNotFound
The key is not present in the object
UnexpectedToken
There was an unexpected token in the input stream
EndOfStream
The input stream terminated while scanning a type
Trait Implementations§
source§impl Clone for JSONParsingError
impl Clone for JSONParsingError
source§fn clone(&self) -> JSONParsingError
fn clone(&self) -> JSONParsingError
Returns a copy of the value. Read more
1.0.0 · 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 JSONParsingError
impl Debug for JSONParsingError
source§impl PartialEq<JSONParsingError> for JSONParsingError
impl PartialEq<JSONParsingError> for JSONParsingError
source§fn eq(&self, other: &JSONParsingError) -> bool
fn eq(&self, other: &JSONParsingError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for JSONParsingError
impl Eq for JSONParsingError
impl StructuralEq for JSONParsingError
impl StructuralPartialEq for JSONParsingError
Auto Trait Implementations§
impl RefUnwindSafe for JSONParsingError
impl Send for JSONParsingError
impl Sync for JSONParsingError
impl Unpin for JSONParsingError
impl UnwindSafe for JSONParsingError
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