pub trait ProcessState: Sized + Default {
    type Config: ProcessConfig + Default + Send + Sync;

Show 13 methods fn new(
        runtime: WasmtimeRuntime,
        module: WasmtimeCompiledModule<Self>,
        config: Arc<Self::Config>,
        registry: Arc<DashMap<String, Arc<dyn Process>>>
    ) -> Result<Self>; fn register(linker: &mut Linker<Self>) -> Result<()>; fn initialize(&mut self); fn is_initialized(&self) -> bool; fn runtime(&self) -> &WasmtimeRuntime; fn module(&self) -> &WasmtimeCompiledModule<Self>; fn config(&self) -> &Arc<Self::Config>; fn id(&self) -> Uuid; fn signal_mailbox(&self) -> &(Sender<Signal>, Receiver<Signal>); fn message_mailbox(&self) -> &MessageMailboxNotable traits for &MessageMailboximpl Future for &MessageMailbox type Output = Message;; fn config_resources(&self) -> &ConfigResources<Self::Config>; fn config_resources_mut(&mut self) -> &mut ConfigResources<Self::Config>; fn registry(&self) -> &Arc<DashMap<String, Arc<dyn Process>>>;
}
Expand description

The internal state of a process.

The ProcessState has two main roles:

  • It holds onto all vm resources (file descriptors, tcp streams, channels, …)
  • Registers all host functions working on those resources to the Linker

Required Associated Types

Required Methods

Register all host functions to the linker.

Marks a wasm instance as initialized

Returns true if the instance was initialized

Returns the WebAssembly runtime

Returns the process configuration

Implementors