pub struct VmError { /* private fields */ }Expand description
A virtual machine error which includes tracing information.
Implementations§
Source§impl VmError
impl VmError
Sourcepub fn panic<D>(message: D) -> Selfwhere
D: 'static + BoxedPanic,
pub fn panic<D>(message: D) -> Selfwhere
D: 'static + BoxedPanic,
Construct an error containing a panic.
Sourcepub fn expected<E>(actual: TypeInfo) -> Self
pub fn expected<E>(actual: TypeInfo) -> Self
Construct an expectation error. The actual type received is actual,
but we expected E.
Sourcepub fn chain(&self) -> &[VmErrorAt]
pub fn chain(&self) -> &[VmErrorAt]
Get the full backtrace of errors and their corresponding instructions.
Sourcepub fn stacktrace(&self) -> &[VmErrorLocation]
pub fn stacktrace(&self) -> &[VmErrorLocation]
Get the full backtrace of errors and their corresponding instructions.
Sourcepub fn first_location(&self) -> Option<&VmErrorLocation>
pub fn first_location(&self) -> Option<&VmErrorLocation>
Get the first error location.
Trait Implementations§
Source§impl Error for VmError
impl Error for VmError
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()
Source§impl<E> From<CustomError<E>> for VmError
impl<E> From<CustomError<E>> for VmError
Source§fn from(error: CustomError<E>) -> Self
fn from(error: CustomError<E>) -> Self
Converts to this type from the input type.
Source§impl From<VmError> for RuntimeError
impl From<VmError> for RuntimeError
Auto Trait Implementations§
impl !RefUnwindSafe for VmError
impl !UnwindSafe for VmError
impl Forget for VmError
impl Freeze for VmError
impl Move for VmError
impl Send for VmErrorwhere
BoxRaw<VmErrorInner>: Send,
impl Sync for VmErrorwhere
BoxRaw<VmErrorInner>: Sync,
impl Unpin for VmError
impl UnsafeUnpin for VmError
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