pub struct PythonExecution { /* private fields */ }Implementations§
Source§impl PythonExecution
impl PythonExecution
pub fn execution_id(&self) -> &str
pub fn child_pid(&self) -> u32
pub fn write_stdin(&mut self, chunk: &[u8]) -> Result<(), PythonExecutionError>
pub fn close_stdin(&mut self) -> Result<(), PythonExecutionError>
pub fn cancel(&mut self) -> Result<(), PythonExecutionError>
pub fn kill(&mut self) -> Result<(), PythonExecutionError>
pub fn respond_vfs_rpc_success( &mut self, id: u64, payload: PythonVfsRpcResponsePayload, ) -> Result<(), PythonExecutionError>
pub fn respond_vfs_rpc_error( &mut self, id: u64, code: impl Into<String>, message: impl Into<String>, ) -> Result<(), PythonExecutionError>
pub fn respond_javascript_sync_rpc_success( &mut self, id: u64, result: Value, ) -> Result<(), PythonExecutionError>
pub fn respond_javascript_sync_rpc_error( &mut self, id: u64, code: impl Into<String>, message: impl Into<String>, ) -> Result<(), PythonExecutionError>
pub async fn poll_event( &mut self, timeout: Duration, ) -> Result<Option<PythonExecutionEvent>, PythonExecutionError>
Sourcepub fn try_service_standalone_module_sync_rpc(
&mut self,
request: &JavascriptSyncRpcRequest,
) -> Result<bool, PythonExecutionError>
pub fn try_service_standalone_module_sync_rpc( &mut self, request: &JavascriptSyncRpcRequest, ) -> Result<bool, PythonExecutionError>
Service a module-resolution JS sync RPC host-directly via the underlying
JS execution’s translator. For consumers driving poll_event_blocking
manually without a kernel/service loop.
pub fn poll_event_blocking( &mut self, timeout: Duration, ) -> Result<Option<PythonExecutionEvent>, PythonExecutionError>
pub fn wait( self, timeout: Option<Duration>, ) -> Result<PythonExecutionResult, PythonExecutionError>
Trait Implementations§
Source§impl Debug for PythonExecution
impl Debug for PythonExecution
Source§impl Drop for PythonExecution
impl Drop for PythonExecution
Auto Trait Implementations§
impl !Freeze for PythonExecution
impl !RefUnwindSafe for PythonExecution
impl Send for PythonExecution
impl Sync for PythonExecution
impl Unpin for PythonExecution
impl UnsafeUnpin for PythonExecution
impl UnwindSafe for PythonExecution
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