pub enum PatchError {
NodeNotFound {
node_id: String,
},
FunctionNotFound {
func_id: String,
},
DuplicateFunction {
name: String,
},
ValidationFailed {
op_index: usize,
message: String,
},
TypeCheckFailed {
message: String,
},
VersionMismatch {
expected: String,
actual: String,
},
}Expand description
Errors that can occur during patch operations.
Variants§
NodeNotFound
The patch targets a node ID that doesn’t exist in the module.
FunctionNotFound
The patch targets a function ID that doesn’t exist.
DuplicateFunction
Adding a function with a name that already exists in the module.
ValidationFailed
Structural validation of one of the patch operations failed.
Fields
§
op_index: usizeIndex into Patch::operations where validation failed.
TypeCheckFailed
The module produced by the patch fails type checking.
VersionMismatch
The patch was written against a different module version than the current state.
Trait Implementations§
Source§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()
Auto Trait Implementations§
impl Freeze for PatchError
impl RefUnwindSafe for PatchError
impl Send for PatchError
impl Sync for PatchError
impl Unpin for PatchError
impl UnsafeUnpin 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