#[non_exhaustive]pub enum ErrorKind {
Source(SourceError),
Compile(CompileError),
Vm(Box<VmError>),
Embed(String),
External(Arc<dyn Error + Send + Sync>),
}Expand description
The original failure category. Match this instead of parsing error text.
New categories can be added as the language and embedding API grow. Include
a fallback arm when matching an error’s kind.
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.
Source(SourceError)
The source could not be lexed or parsed.
Compile(CompileError)
Parsed source could not be compiled.
Vm(Box<VmError>)
Execution or VM validation failed, including resource and handle errors.
Embed(String)
An embedding or conversion failure described by a message.
External(Arc<dyn Error + Send + Sync>)
A host error whose original type and cause chain are preserved.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorKind
impl !RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl !UnwindSafe for ErrorKind
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