Struct wasmer_engine::RuntimeError
source · [−]pub struct RuntimeError { /* private fields */ }
Expand description
A struct representing an aborted instruction execution, with a message indicating the cause.
Implementations
Creates a new generic RuntimeError
with the given message
.
Example
let trap = wasmer_engine::RuntimeError::new("unexpected error");
assert_eq!("unexpected error", trap.message());
👎 Deprecated since 2.1.1: return a Result from host functions instead
👎 Deprecated since 2.1.1:
return a Result from host functions instead
Raises a custom user Error
Creates a custom user Error.
This error object can be passed through Wasm frames and later retrieved
using the downcast
method.
Returns a list of function frames in WebAssembly code that led to this trap happening.
Attempts to downcast the RuntimeError
to a concrete type.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for RuntimeError
impl Send for RuntimeError
impl Sync for RuntimeError
impl Unpin for RuntimeError
impl !UnwindSafe for RuntimeError
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more
pub fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
pub fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer