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

Function result_to_event

crates/debugger/src/host/api.rs:253–265  ·  view source on GitHub ↗
(table: &mut ResourceTable, value: DebugRunResult)

Source from the content-addressed store, hash-verified

251}
252
253fn result_to_event(table: &mut ResourceTable, value: DebugRunResult) -> Result<wit::Event> {
254 Ok(match value {
255 DebugRunResult::Finished => wit::Event::Complete,
256 DebugRunResult::HostcallError => wit::Event::Trap,
257 DebugRunResult::Trap(_t) => wit::Event::Trap,
258 DebugRunResult::Breakpoint => wit::Event::Breakpoint,
259 DebugRunResult::EpochYield => wit::Event::Interrupted,
260 DebugRunResult::Exception(e) => {
261 let e = table.push(WasmException(e))?;
262 wit::Event::Exception(e)
263 }
264 })
265}
266
267impl wit::HostEventFuture for ResourceTable {
268 async fn finish(

Callers 1

finishMethod · 0.85

Calls 3

OkFunction · 0.85
WasmExceptionClass · 0.85
pushMethod · 0.45

Tested by

no test coverage detected