MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / with_recv

Function with_recv

compiler/src/main/mod.rs:173–175  ·  view source on GitHub ↗

`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)

Source from the content-addressed store, hash-verified

171
172/* `dispatch_*` prologue: resolve `recv_h` and run `f` against the live VM. Fails on stale handle or call outside `run()`. */
173pub(super) fn with_recv<F>(invalid_recv_msg: &'static str, recv_h: u32, f: F) -> Result<Val, VmErr>
174where 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()"))? }

Callers 9

dispatch_callFunction · 0.85
dispatch_get_attrFunction · 0.85
dispatch_set_attrFunction · 0.85
dispatch_get_itemFunction · 0.85
dispatch_set_itemFunction · 0.85
dispatch_lenFunction · 0.85
dispatch_iterFunction · 0.85
dispatch_iter_nextFunction · 0.85
dispatch_type_ofFunction · 0.85

Calls 2

get_valFunction · 0.85
with_vmFunction · 0.85

Tested by

no test coverage detected