pub struct WorkerRuntime { /* private fields */ }Expand description
The worker-side runtime that processes host commands.
Implementations§
Source§impl WorkerRuntime
impl WorkerRuntime
pub fn new() -> Self
Sourcepub fn set_external_handler(&mut self, handler: ExternalCommandHandler)
pub fn set_external_handler(&mut self, handler: ExternalCommandHandler)
Register a handler for external commands (e.g. python3 in Pyodide).
Sourcepub fn set_network_backend(&mut self, backend: Box<dyn NetworkBackend>)
pub fn set_network_backend(&mut self, backend: Box<dyn NetworkBackend>)
Register a network backend for curl/wget utilities.
Sourcepub fn handle_command(&mut self, cmd: HostCommand) -> Vec<WorkerEvent>
pub fn handle_command(&mut self, cmd: HostCommand) -> Vec<WorkerEvent>
Process a host command and return a list of events to send back.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WorkerRuntime
impl !RefUnwindSafe for WorkerRuntime
impl !Send for WorkerRuntime
impl !Sync for WorkerRuntime
impl Unpin for WorkerRuntime
impl UnsafeUnpin for WorkerRuntime
impl !UnwindSafe for WorkerRuntime
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