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

Method push_event

compiler/src/modules/vm/init.rs:136–140  ·  view source on GitHub ↗

Push a string event onto the event queue; consumed by the next `receive()` call. Mirrors what `run_push_event` does for WASM hosts. */

(&mut self, message: &str)

Source from the content-addressed store, hash-verified

134
135 /* Push a string event onto the event queue; consumed by the next `receive()` call. Mirrors what `run_push_event` does for WASM hosts. */
136 pub fn push_event(&mut self, message: &str) -> Result<(), VmErr> {
137 let val = self.heap.alloc(HeapObj::Str(message.into()))?;
138 self.inject_event(val);
139 Ok(())
140 }
141
142 pub fn run(&mut self) -> Result<Val, VmErr> {
143 self.error_byte_pos = None;

Callers 3

driveFunction · 0.80
test_casesFunction · 0.80
strict_casesFunction · 0.80

Calls 2

inject_eventMethod · 0.80
allocMethod · 0.45

Tested by 3

driveFunction · 0.64
test_casesFunction · 0.64
strict_casesFunction · 0.64