Struct jsonptr::UnresolvableError
source · [−]Expand description
Represents an error that occurs when attempting to resolve a Pointer that
encounters a leaf node (i.e. a scalar / null value) which is not the root
of the Pointer.
Example
use serde_json::json;
use jsonptr::{Pointer, ResolveMut, Resolve, UnresolvableError};
let mut data = json!({ "foo": "bar" });
let ptr = Pointer::try_from("/foo/unreachable").unwrap();
let err = data.resolve_mut(&ptr).unwrap_err();
assert_eq!(err, UnresolvableError::new(ptr.clone()).into());Fields
pointer: PointerThe unresolved Pointer.
leaf: Option<Token>The leaf node, if applicable, which was expected to be either an
Object or an Array.
Implementations
Trait Implementations
sourceimpl Clone for UnresolvableError
impl Clone for UnresolvableError
sourcefn clone(&self) -> UnresolvableError
fn clone(&self) -> UnresolvableError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for UnresolvableError
impl Debug for UnresolvableError
sourceimpl Display for UnresolvableError
impl Display for UnresolvableError
sourceimpl From<UnresolvableError> for Error
impl From<UnresolvableError> for Error
sourcefn from(err: UnresolvableError) -> Self
fn from(err: UnresolvableError) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<UnresolvableError> for UnresolvableError
impl PartialEq<UnresolvableError> for UnresolvableError
sourcefn eq(&self, other: &UnresolvableError) -> bool
fn eq(&self, other: &UnresolvableError) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &UnresolvableError) -> bool
fn ne(&self, other: &UnresolvableError) -> bool
This method tests for !=.
impl Eq for UnresolvableError
impl StructuralEq for UnresolvableError
impl StructuralPartialEq for UnresolvableError
Auto Trait Implementations
impl RefUnwindSafe for UnresolvableError
impl Send for UnresolvableError
impl Sync for UnresolvableError
impl Unpin for UnresolvableError
impl UnwindSafe for UnresolvableError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more