pub enum MergePatchError {
InvalidShape {
expected: &'static str,
actual: &'static str,
},
CardinalityViolation {
expected: usize,
actual: usize,
},
Context {
path: String,
source: Box<Self>,
},
}Expand description
MergePatchError
Structured failures for user-driven patch application.
Variants§
Implementations§
Source§impl MergePatchError
impl MergePatchError
Sourcepub fn with_field(self, field: impl AsRef<str>) -> Self
pub fn with_field(self, field: impl AsRef<str>) -> Self
Prepend a field segment to the merge error path.
Sourcepub fn with_index(self, index: usize) -> Self
pub fn with_index(self, index: usize) -> Self
Prepend an index segment to the merge error path.
Trait Implementations§
Source§impl Clone for MergePatchError
impl Clone for MergePatchError
Source§fn clone(&self) -> MergePatchError
fn clone(&self) -> MergePatchError
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 MergePatchError
impl Debug for MergePatchError
Source§impl Display for MergePatchError
impl Display for MergePatchError
Source§impl Error for MergePatchError
impl Error for MergePatchError
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 From<MergePatchError> for InternalError
impl From<MergePatchError> for InternalError
Source§fn from(err: MergePatchError) -> Self
fn from(err: MergePatchError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MergePatchError
impl PartialEq for MergePatchError
impl Eq for MergePatchError
impl StructuralPartialEq for MergePatchError
Auto Trait Implementations§
impl Freeze for MergePatchError
impl RefUnwindSafe for MergePatchError
impl Send for MergePatchError
impl Sync for MergePatchError
impl Unpin for MergePatchError
impl UnsafeUnpin for MergePatchError
impl UnwindSafe for MergePatchError
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