[][src]Function substrate_wasmtime_runtime::raise_lib_trap

pub unsafe fn raise_lib_trap(trap: Trap) -> !

Raises a trap from inside library code immediately.

This function performs as-if a wasm trap was just executed. This trap payload is then returned from catch_traps below.

Safety

Only safe to call when wasm code is on the stack, aka catch_traps must have been previously called. Additionally no Rust destructors can be on the stack. They will be skipped and not executed.