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 custom<S>(msg: S) -> InvarError
pub fn custom<S>(msg: S) -> InvarError
Create a custom error with a message.
Sourcepub fn invalid_invariant<S>(msg: S) -> InvarError
pub fn invalid_invariant<S>(msg: S) -> InvarError
Create an invalid invariant error.
Sourcepub fn undefined_identifier<S>(name: S) -> InvarError
pub fn undefined_identifier<S>(name: S) -> InvarError
Create an undefined identifier error.
Sourcepub fn type_mismatch<S>(msg: S) -> InvarError
pub fn type_mismatch<S>(msg: S) -> InvarError
Create a type mismatch error.
Sourcepub fn unsupported<S>(msg: S) -> InvarError
pub fn unsupported<S>(msg: S) -> InvarError
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()
Source§impl From<Error> for InvarError
impl From<Error> for InvarError
Source§fn from(source: Error) -> InvarError
fn from(source: Error) -> InvarError
Converts to this type from the input type.
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