pub enum Error {
Index(IndexError),
Unresolvable(UnresolvableError),
NotFound(NotFoundError),
MalformedPointer(MalformedPointerError),
}Expand description
An enum representing possible errors that can occur when resolving or mutating by a JSON Pointer.
Variants
Index(IndexError)
Indicates an error occurred while parsing a usize (ParseError) or the
parsed value was out of bounds for the targeted array.
Unresolvable(UnresolvableError)
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.
NotFound(NotFoundError)
Indicates that a Pointer was not found in the data.
MalformedPointer(MalformedPointerError)
Indicates that a Pointer was malformed.
Implementations
sourceimpl Error
impl Error
sourcepub fn is_unresolvable(&self) -> bool
pub fn is_unresolvable(&self) -> bool
Returns true if the error is Error::UnresolvableError.
sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Returns true if the error is Error::NotFoundError.
sourcepub fn is_malformed_pointer(&self) -> bool
pub fn is_malformed_pointer(&self) -> bool
Returns true if the error is Error::MalformedPointerError.
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<IndexError> for Error
impl From<IndexError> for Error
sourcefn from(err: IndexError) -> Self
fn from(err: IndexError) -> Self
Converts to this type from the input type.
sourceimpl From<MalformedPointerError> for Error
impl From<MalformedPointerError> for Error
sourcefn from(err: MalformedPointerError) -> Self
fn from(err: MalformedPointerError) -> Self
Converts to this type from the input type.
sourceimpl From<NotFoundError> for Error
impl From<NotFoundError> for Error
sourcefn from(err: NotFoundError) -> Self
fn from(err: NotFoundError) -> Self
Converts to this type from the input type.
sourceimpl From<OutOfBoundsError> for Error
impl From<OutOfBoundsError> for Error
sourcefn from(err: OutOfBoundsError) -> Self
fn from(err: OutOfBoundsError) -> Self
Converts to this type from the input type.
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.
impl Eq for Error
impl StructuralEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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