`dispatch_*` prologue: resolve `recv_h` and run `f` against the live VM. Fails on stale handle or call outside `run()`. */
(invalid_recv_msg: &'static str, recv_h: u32, f: F)
| 171 | |
| 172 | /* `dispatch_*` prologue: resolve `recv_h` and run `f` against the live VM. Fails on stale handle or call outside `run()`. */ |
| 173 | pub(super) fn with_recv<F>(invalid_recv_msg: &'static str, recv_h: u32, f: F) -> Result<Val, VmErr> |
| 174 | where F: FnOnce(&mut VM<'static>, Val) -> Result<Val, VmErr> |
| 175 | { let recv = get_val(recv_h).ok_or(VmErr::Runtime(invalid_recv_msg))?; with_vm(|vm| f(vm, recv)).ok_or(VmErr::Runtime("edge_op called outside run()"))? } |
no test coverage detected