#[non_exhaustive]pub enum ValidationError {
Show 15 variants
TraceSpecNotFound(PathBuf),
TraceFileNotFound(PathBuf),
EmptyTrace(PathBuf),
InvalidJson {
line: usize,
reason: String,
},
NonObjectState {
found: String,
},
InconsistentSchema {
line: usize,
expected: Vec<String>,
found: Vec<String>,
},
UnsupportedType {
line: usize,
field: String,
reason: String,
},
FloatNotSupported {
line: usize,
field: String,
value: f64,
},
TlaConversion {
line: usize,
reason: String,
},
Apalache(ApalacheError),
WorkDir(String),
FileCopy {
path: PathBuf,
reason: String,
},
Io(Error),
EmitterFinished,
InconsistentArrayType {
field: String,
expected: String,
found: String,
},
}Expand description
Error during trace validation (Approach 3).
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.
TraceSpecNotFound(PathBuf)
TraceSpec file not found.
TraceFileNotFound(PathBuf)
Trace file not found.
EmptyTrace(PathBuf)
Trace file is empty.
InvalidJson
Invalid JSON in trace file.
NonObjectState
State must serialize to a JSON object.
InconsistentSchema
Inconsistent record schema across trace lines.
UnsupportedType
Unsupported JSON value type.
FloatNotSupported
Float values not supported (TLA+ uses Int).
TlaConversion
Failed to convert to TLA+ record.
Apalache(ApalacheError)
Apalache CLI error.
WorkDir(String)
Failed to create work directory.
FileCopy
Failed to copy spec files.
Io(Error)
IO error during validation.
EmitterFinished
Cannot emit after StateEmitter has been finished.
InconsistentArrayType
Inconsistent array element types.
Trait Implementations§
Source§impl Debug for ValidationError
impl Debug for ValidationError
Source§impl Display for ValidationError
impl Display for ValidationError
Source§impl Error for ValidationError
impl Error for ValidationError
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<ApalacheError> for ValidationError
impl From<ApalacheError> for ValidationError
Source§fn from(source: ApalacheError) -> Self
fn from(source: ApalacheError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for ValidationError
impl From<Error> for ValidationError
Source§impl From<ValidationError> for Error
impl From<ValidationError> for Error
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ValidationError
impl !RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnsafeUnpin for ValidationError
impl !UnwindSafe for ValidationError
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