pub enum ApplyError {
UnknownNode {
id: NodeId,
},
WrongNodeKind {
id: NodeId,
reason: String,
},
InvalidPayload {
reason: String,
},
}Expand description
Failure during Workspace::apply.
§Why these particular variants
Every EditCommand variant targets a node by NodeId. The two
failure modes are “that ID doesn’t exist” and “the ID exists but
refers to a node of the wrong kind for this command”. Everything
else (file-not-found when AddRuleSet with a missing path) is a
validation issue reported via ApplyResult::diagnostics, not an
error return.
Variants§
UnknownNode
The NodeId in the command wasn’t found in the workspace.
WrongNodeKind
The NodeId exists but names a node of the wrong kind for this
command (e.g. DeleteRule pointing at a rule-set ID).
InvalidPayload
Invalid command payload (e.g. MoveRule with new_index past
end of parent’s rule list).
Trait Implementations§
Source§impl Debug for ApplyError
impl Debug for ApplyError
Source§impl Display for ApplyError
impl Display for ApplyError
Source§impl Error for ApplyError
impl Error for ApplyError
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 ApplyError
impl RefUnwindSafe for ApplyError
impl Send for ApplyError
impl Sync for ApplyError
impl Unpin for ApplyError
impl UnsafeUnpin for ApplyError
impl UnwindSafe for ApplyError
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