pub enum ModelError {
NodeNotFound(NodeId),
TermNotFound(TermId),
RegionNotFound(RegionId),
InvalidLocal(String),
InvalidGlobal(String),
UnexpectedOperation(NodeId),
TypeError(TermId),
InvalidRegions(NodeId),
MalformedName(SmolStr),
MalformedCondition(NodeId),
InvalidOperation(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.
InvalidOperation(NodeId)
There is a node that is not well-formed or has the invalid operation.
Trait Implementations§
source§impl Clone for ModelError
impl Clone for ModelError
source§fn clone(&self) -> ModelError
fn clone(&self) -> ModelError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
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
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)
clone_to_uninit)