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 first_location(&self) -> Option<&VmErrorLocation>
pub fn first_location(&self) -> Option<&VmErrorLocation>
Get the first error location.
Trait Implementations§
source§impl Error for VmError
Available on crate feature std
only.
impl Error for VmError
Available on crate feature
std
only.1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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.
Auto Trait Implementations§
impl !RefUnwindSafe for VmError
impl Send for VmError
impl Sync for VmError
impl Unpin for VmError
impl !UnwindSafe 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