(code: u8)
| 121 | |
| 122 | #[unsafe(no_mangle)] |
| 123 | pub 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)] |
| 131 | pub extern "C" fn wasm_trap_message(trap: &wasm_trap_t, out: &mut wasm_message_t) { |