pub struct WasmExecution { /* private fields */ }Implementations§
Source§impl WasmExecution
impl WasmExecution
pub fn execution_id(&self) -> &str
pub fn child_pid(&self) -> u32
pub fn v8_session_handle(&self) -> V8SessionHandle
pub fn write_stdin(&mut self, chunk: &[u8]) -> Result<(), WasmExecutionError>
Sourcepub fn write_stdin_kernel_only(
&mut self,
chunk: &[u8],
) -> Result<(), WasmExecutionError>
pub fn write_stdin_kernel_only( &mut self, chunk: &[u8], ) -> Result<(), WasmExecutionError>
Feed stdin WITHOUT emitting a stdin stream event to the V8 session.
Sidecar-managed wasm always reads stdin through the kernel
(__kernel_stdin_read); the stream event is never consumed there, and
while the guest thread is blocked in a sync bridge call every
unconsumed event lands in the session’s bounded deferred-message queue
— one dead event per keystroke until the queue limit kills the session.
pub fn close_stdin(&mut self) -> Result<(), WasmExecutionError>
pub fn send_stream_event( &self, event_type: &str, payload: Value, ) -> Result<(), WasmExecutionError>
pub fn terminate(&self) -> Result<(), WasmExecutionError>
pub fn respond_sync_rpc_success( &mut self, id: u64, result: Value, ) -> Result<(), WasmExecutionError>
pub fn respond_sync_rpc_raw_success( &mut self, id: u64, payload: Vec<u8>, ) -> Result<(), WasmExecutionError>
pub fn respond_sync_rpc_error( &mut self, id: u64, code: impl Into<String>, message: impl Into<String>, ) -> Result<(), WasmExecutionError>
pub async fn poll_event( &mut self, timeout: Duration, ) -> Result<Option<WasmExecutionEvent>, WasmExecutionError>
pub fn poll_event_blocking( &mut self, timeout: Duration, ) -> Result<Option<WasmExecutionEvent>, WasmExecutionError>
pub fn wait(self) -> Result<WasmExecutionResult, WasmExecutionError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WasmExecution
impl !RefUnwindSafe for WasmExecution
impl Send for WasmExecution
impl Sync for WasmExecution
impl Unpin for WasmExecution
impl UnsafeUnpin for WasmExecution
impl UnwindSafe for WasmExecution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more