pub enum InvarError {
IoError(Error),
InvalidInvariant(String),
UndefinedIdentifier(String),
TypeMismatch(String),
Unsupported(String),
AnalysisFailed(String),
GenerationFailed(String),
SimulationFailed(String),
ConfigError(String),
Custom(String),
}Expand description
Errors that can occur during invariant analysis and generation.
Variants§
IoError(Error)
IO error occurred during file operations.
InvalidInvariant(String)
Invalid invariant syntax or structure.
UndefinedIdentifier(String)
Undefined identifier in invariant expression.
TypeMismatch(String)
Type mismatch in expression.
Unsupported(String)
Unsupported chain or pattern.
AnalysisFailed(String)
Analysis failed with details.
GenerationFailed(String)
Generation failed with details.
SimulationFailed(String)
Simulation failed with details.
ConfigError(String)
Configuration or parsing error.
Custom(String)
Custom error message.
Implementations§
Source§impl InvarError
impl InvarError
Sourcepub fn invalid_invariant<S: Into<String>>(msg: S) -> Self
pub fn invalid_invariant<S: Into<String>>(msg: S) -> Self
Create an invalid invariant error.
Sourcepub fn undefined_identifier<S: Into<String>>(name: S) -> Self
pub fn undefined_identifier<S: Into<String>>(name: S) -> Self
Create an undefined identifier error.
Sourcepub fn type_mismatch<S: Into<String>>(msg: S) -> Self
pub fn type_mismatch<S: Into<String>>(msg: S) -> Self
Create a type mismatch error.
Sourcepub fn unsupported<S: Into<String>>(msg: S) -> Self
pub fn unsupported<S: Into<String>>(msg: S) -> Self
Create an unsupported pattern error.
Trait Implementations§
Source§impl Debug for InvarError
impl Debug for InvarError
Source§impl Display for InvarError
impl Display for InvarError
Source§impl Error for InvarError
impl Error for InvarError
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 InvarError
impl !RefUnwindSafe for InvarError
impl Send for InvarError
impl Sync for InvarError
impl Unpin for InvarError
impl UnsafeUnpin for InvarError
impl !UnwindSafe for InvarError
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