pub struct WasmExecutionEngine { /* private fields */ }Implementations§
Source§impl WasmExecutionEngine
impl WasmExecutionEngine
pub fn new(runtime: RuntimeContext) -> Self
pub fn set_runtime_context(&mut self, runtime: RuntimeContext)
pub fn set_event_notify(&mut self, notify: Option<Arc<Notify>>)
pub fn create_context( &mut self, request: CreateWasmContextRequest, ) -> WasmContext
Sourcepub fn dispose_context(&mut self, context_id: &str) -> bool
pub fn dispose_context(&mut self, context_id: &str) -> bool
Dispose the WASM context and the private JavaScript bridge context that belongs to it. A started execution has already cloned all required runtime state and remains valid after this returns.
pub fn start_execution( &mut self, request: StartWasmExecutionRequest, ) -> Result<WasmExecution, WasmExecutionError>
pub fn prepare_execution( &mut self, request: StartWasmExecutionRequest, ) -> Result<WasmExecution, WasmExecutionError>
pub fn start_execution_with_runtime( &mut self, request: StartWasmExecutionRequest, runtime: RuntimeContext, ) -> Result<WasmExecution, WasmExecutionError>
Sourcepub async fn start_execution_with_runtime_async(
&mut self,
request: StartWasmExecutionRequest,
runtime: RuntimeContext,
) -> Result<WasmExecution, WasmExecutionError>
pub async fn start_execution_with_runtime_async( &mut self, request: StartWasmExecutionRequest, runtime: RuntimeContext, ) -> Result<WasmExecution, WasmExecutionError>
Start a WASM execution from an async sidecar dispatch path. Import-cache materialization and the optional V8 prewarm await their existing bounded workers instead of blocking a Tokio runtime worker.
pub fn dispose_vm(&mut self, vm_id: &str)
Trait Implementations§
Source§impl Debug for WasmExecutionEngine
impl Debug for WasmExecutionEngine
Auto Trait Implementations§
impl !RefUnwindSafe for WasmExecutionEngine
impl !UnwindSafe for WasmExecutionEngine
impl Freeze for WasmExecutionEngine
impl Send for WasmExecutionEngine
impl Sync for WasmExecutionEngine
impl Unpin for WasmExecutionEngine
impl UnsafeUnpin for WasmExecutionEngine
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