lunatic_distributed

Trait DistributedCtx

Source
pub trait DistributedCtx<E: Environment>: ProcessState + Sized {
    // Required methods
    fn new_dist_state(
        environment: Arc<E>,
        distributed: DistributedProcessState,
        runtime: WasmtimeRuntime,
        module: Arc<WasmtimeCompiledModule<Self>>,
        config: Arc<Self::Config>,
    ) -> Result<Self>;
    fn distributed(&self) -> Result<&DistributedProcessState>;
    fn distributed_mut(&mut self) -> Result<&mut DistributedProcessState>;
    fn module_id(&self) -> u64;
    fn environment_id(&self) -> u64;
    fn can_spawn(&self) -> bool;
}

Required Methods§

Source

fn new_dist_state( environment: Arc<E>, distributed: DistributedProcessState, runtime: WasmtimeRuntime, module: Arc<WasmtimeCompiledModule<Self>>, config: Arc<Self::Config>, ) -> Result<Self>

Source

fn distributed(&self) -> Result<&DistributedProcessState>

Source

fn distributed_mut(&mut self) -> Result<&mut DistributedProcessState>

Source

fn module_id(&self) -> u64

Source

fn environment_id(&self) -> u64

Source

fn can_spawn(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§