#[non_exhaustive]pub enum ModelError {
NodeNotFound(NodeId),
TermNotFound(TermId),
RegionNotFound(RegionId),
InvalidVar(VarId),
InvalidSymbol(NodeId),
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 (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future 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.
InvalidVar(VarId)
Invalid variable reference.
InvalidSymbol(NodeId)
Invalid symbol reference.
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
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more