pub enum ModelError {
NodeNotFound(NodeId),
TermNotFound(TermId),
RegionNotFound(RegionId),
InvalidLocal(String),
InvalidGlobal(String),
UnexpectedOperation(NodeId),
TypeError(TermId),
InvalidRegions(NodeId),
MalformedName(SmolStr),
MalformedCondition(NodeId),
}Expand description
Errors that can occur when traversing and interpreting the model.
Variants§
NodeNotFound(NodeId)
There is a reference to a node that does not exist.
TermNotFound(TermId)
There is a reference to a term that does not exist.
RegionNotFound(RegionId)
There is a reference to a region that does not exist.
InvalidLocal(String)
There is a local reference that does not resolve.
InvalidGlobal(String)
There is a global reference that does not resolve to a node that defines a global variable.
UnexpectedOperation(NodeId)
The model contains an operation in a place where it is not allowed.
TypeError(TermId)
There is a term that is not well-typed.
InvalidRegions(NodeId)
There is a node whose regions are not well-formed according to the node’s operation.
MalformedName(SmolStr)
There is a name that is not well-formed.
MalformedCondition(NodeId)
There is a condition node that lacks a case for a tag or defines two cases for the same tag.
Trait Implementations§
source§impl Clone for ModelError
impl Clone for ModelError
source§fn clone(&self) -> ModelError
fn clone(&self) -> ModelError
Returns a copy 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 ModelError
impl Debug for ModelError
source§impl Display for ModelError
impl Display for ModelError
source§impl Error for ModelError
impl Error for ModelError
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 ModelError
impl RefUnwindSafe for ModelError
impl Send for ModelError
impl Sync for ModelError
impl Unpin for ModelError
impl UnwindSafe for ModelError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)