#[non_exhaustive]pub enum MiraError {
Compile {
diagnostics: Vec<u32>,
},
InvalidBytecode {
offset: usize,
reason: String,
},
Runtime {
message: String,
function: Option<String>,
offset: Option<usize>,
stack: Vec<String>,
},
Conversion {
expected: String,
actual: String,
path: Option<String>,
},
Extern {
message: String,
},
BorrowConflict {
operation: &'static str,
tag: String,
},
Timeout,
MaxCallDepth {
max: u32,
},
EscapingClosure,
ExecutionEnded,
}Expand description
An error produced while compiling, decoding, executing, or bridging values.
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.
Compile
Source compilation failed.
InvalidBytecode
The compiled bytecode chunk failed structural validation.
Fields
Runtime
Script execution failed.
Fields
Conversion
A MiraScript value could not be converted to the requested Rust type.
Fields
Extern
A host extern reported an error.
BorrowConflict
A live Rust value was already borrowed incompatibly.
Fields
Timeout
Execution exceeded crate::RunOptions::timeout.
MaxCallDepth
Execution exceeded the configured call-depth limit.
EscapingClosure
A script closure or script module attempted to outlive its execution.
ExecutionEnded
A previously captured script value was used after execution ended.
Implementations§
Trait Implementations§
Source§impl Error for MiraError
impl Error for MiraError
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()
impl StructuralPartialEq for MiraError
Auto Trait Implementations§
impl Freeze for MiraError
impl RefUnwindSafe for MiraError
impl Send for MiraError
impl Sync for MiraError
impl Unpin for MiraError
impl UnsafeUnpin for MiraError
impl UnwindSafe for MiraError
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