MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / wasmtime_trap_new_code

Function wasmtime_trap_new_code

crates/c-api/src/trap.rs:123–128  ·  view source on GitHub ↗
(code: u8)

Source from the content-addressed store, hash-verified

121
122#[unsafe(no_mangle)]
123pub unsafe extern "C" fn wasmtime_trap_new_code(code: u8) -> Box<wasm_trap_t> {
124 let trap = Trap::from_u8(code).unwrap();
125 Box::new(wasm_trap_t {
126 error: Error::new(trap),
127 })
128}
129
130#[unsafe(no_mangle)]
131pub extern "C" fn wasm_trap_message(trap: &wasm_trap_t, out: &mut wasm_message_t) {

Callers 1

TrapMethod · 0.85

Calls 2

newFunction · 0.50
unwrapMethod · 0.45

Tested by

no test coverage detected