pub enum PatchError {
PathNotFound(String),
InvalidTarget(String),
IndexOutOfBounds {
path: String,
index: usize,
len: usize,
},
TestFailed {
path: String,
expected: String,
actual: String,
},
InvalidPath(String),
InvalidIndex(String),
CannotRemoveRoot,
SourceNotFound(String),
}Expand description
Error type for patch operations.
Variants§
PathNotFound(String)
Path does not exist in the document.
InvalidTarget(String)
Cannot add to non-container (object/array).
IndexOutOfBounds
Array index out of bounds.
Fields
TestFailed
Test operation failed.
Fields
InvalidPath(String)
Invalid path format.
InvalidIndex(String)
Invalid array index.
CannotRemoveRoot
Cannot remove from root.
SourceNotFound(String)
Move/copy source path not found.
Trait Implementations§
Source§impl Clone for PatchError
impl Clone for PatchError
Source§fn clone(&self) -> PatchError
fn clone(&self) -> PatchError
Returns a duplicate 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 PatchError
impl Debug for PatchError
Source§impl Display for PatchError
impl Display for PatchError
Source§impl Error for PatchError
impl Error for PatchError
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 PatchError
impl PartialEq for PatchError
impl Eq for PatchError
impl StructuralPartialEq for PatchError
Auto Trait Implementations§
impl Freeze for PatchError
impl RefUnwindSafe for PatchError
impl Send for PatchError
impl Sync for PatchError
impl Unpin for PatchError
impl UnwindSafe for PatchError
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