pub struct JavascriptExecution { /* private fields */ }Implementations§
Source§impl JavascriptExecution
impl JavascriptExecution
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<(), JavascriptExecutionError>
pub fn close_stdin(&mut self) -> Result<(), JavascriptExecutionError>
pub fn read_kernel_stdin_sync_rpc( &self, request: &JavascriptSyncRpcRequest, ) -> Result<Value, JavascriptExecutionError>
pub fn terminate(&self) -> Result<(), JavascriptExecutionError>
pub fn send_stream_event( &self, event_type: &str, payload: Value, ) -> Result<(), JavascriptExecutionError>
pub fn respond_sync_rpc_success( &mut self, id: u64, result: Value, ) -> Result<(), JavascriptExecutionError>
pub fn respond_sync_rpc_raw_success( &mut self, id: u64, payload: Vec<u8>, ) -> Result<(), JavascriptExecutionError>
pub fn respond_sync_rpc_error( &mut self, id: u64, code: impl Into<String>, message: impl Into<String>, ) -> Result<(), JavascriptExecutionError>
pub async fn poll_event( &self, timeout: Duration, ) -> Result<Option<JavascriptExecutionEvent>, JavascriptExecutionError>
pub fn poll_event_blocking( &self, timeout: Duration, ) -> Result<Option<JavascriptExecutionEvent>, JavascriptExecutionError>
pub fn wait(self) -> Result<JavascriptExecutionResult, JavascriptExecutionError>
Sourcepub fn try_service_standalone_module_sync_rpc(
&mut self,
request: &JavascriptSyncRpcRequest,
) -> Result<bool, JavascriptExecutionError>
pub fn try_service_standalone_module_sync_rpc( &mut self, request: &JavascriptSyncRpcRequest, ) -> Result<bool, JavascriptExecutionError>
Service a module-resolution sync RPC host-directly, for consumers that
drive the V8 bridge without a kernel/service loop (the standalone
wait() loop and the Python/WASM prewarm loops). Uses this execution’s
own path translator (captured at start, including any runtime path
mappings) and a persistent cache. Returns Ok(true) if the request was a
module method and was answered, Ok(false) if it should fall through.
The real VM runtime resolves modules against the kernel VFS on the sidecar service loop and never calls this.
Trait Implementations§
Source§impl Debug for JavascriptExecution
impl Debug for JavascriptExecution
Source§impl Drop for JavascriptExecution
impl Drop for JavascriptExecution
Auto Trait Implementations§
impl !Freeze for JavascriptExecution
impl !RefUnwindSafe for JavascriptExecution
impl Send for JavascriptExecution
impl Sync for JavascriptExecution
impl Unpin for JavascriptExecution
impl UnsafeUnpin for JavascriptExecution
impl UnwindSafe for JavascriptExecution
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