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