pub enum JsonNodeError {
EmptyJson(Option<Box<String>>),
CouldntParseNode(String),
MultiplePropertiesWithSameKey(String),
KeyNotFound(String),
}
Expand description
An error that can occur when parsing a JSON node.
Variants§
EmptyJson(Option<Box<String>>)
The JSON string is empty or has only white space.
If the Option<String>
is Some
, then the current node has a parent node which is the string.
CouldntParseNode(String)
The JSON string could not be parsed.
The String
is the JSON string that could not be parsed.
MultiplePropertiesWithSameKey(String)
The JSON object has multiple properties with the same key.
The String
is the key that is duplicated.
KeyNotFound(String)
The JSON object does not have a property with the given key.
The String
is the key that was not found.
Trait Implementations§
Source§impl Clone for JsonNodeError
impl Clone for JsonNodeError
Source§fn clone(&self) -> JsonNodeError
fn clone(&self) -> JsonNodeError
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 JsonNodeError
impl Debug for JsonNodeError
Source§impl Display for JsonNodeError
impl Display for JsonNodeError
Source§impl Error for JsonNodeError
impl Error for JsonNodeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for JsonNodeError
impl PartialEq for JsonNodeError
impl StructuralPartialEq for JsonNodeError
Auto Trait Implementations§
impl Freeze for JsonNodeError
impl RefUnwindSafe for JsonNodeError
impl Send for JsonNodeError
impl Sync for JsonNodeError
impl Unpin for JsonNodeError
impl UnwindSafe for JsonNodeError
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