[−][src]Struct wasmer_engine::RuntimeError
A struct representing an aborted instruction execution, with a message indicating the cause.
Implementations
impl RuntimeError[src]
pub fn new<I: Into<String>>(message: I) -> Self[src]
Creates a new generic RuntimeError with the given message.
Example
let trap = wasmer_engine::RuntimeError::new("unexpected error"); assert_eq!("unexpected error", trap.message());
pub fn from_trap(trap: Trap) -> Self[src]
Create a new RuntimeError from a Trap.
pub fn raise(error: Box<dyn Error + Send + Sync>) -> ![src]
Raises a custom user Error
pub fn message(&self) -> String[src]
Returns a reference the message stored in Trap.
pub fn trace(&self) -> &[FrameInfo][src]
Returns a list of function frames in WebAssembly code that led to this trap happening.
pub fn downcast<T: Error + 'static>(self) -> Result<T, Self>[src]
Attempts to downcast the RuntimeError to a concrete type.
pub fn is<T: Error + 'static>(&self) -> bool[src]
Returns true if the RuntimeError is the same as T
Trait Implementations
impl Clone for RuntimeError[src]
pub fn clone(&self) -> RuntimeError[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for RuntimeError[src]
impl Display for RuntimeError[src]
impl Error for RuntimeError[src]
pub fn source(&self) -> Option<&(dyn Error + 'static)>[src]
pub fn backtrace(&self) -> Option<&Backtrace>[src]
pub fn description(&self) -> &str1.0.0[src]
pub fn cause(&self) -> Option<&dyn Error>1.0.0[src]
impl From<Trap> for RuntimeError[src]
Auto Trait Implementations
impl !RefUnwindSafe for RuntimeError[src]
impl Send for RuntimeError[src]
impl Sync for RuntimeError[src]
impl Unpin for RuntimeError[src]
impl !UnwindSafe for RuntimeError[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,