pub trait VirtualCommandwhere
    Self: Debug,{
    // Required methods
    fn name(&self) -> &str;
    fn as_any(&self) -> &dyn Any;
    fn exec(
        &self,
        parent_ctx: &FunctionEnvMut<'_, WasiEnv>,
        path: &str,
        store: &mut Option<Store>,
        config: &mut Option<WasiEnv>
    ) -> Result<TaskJoinHandle, SpawnError>;
}
Expand description

A command available to an OS environment.

Required Methods§

source

fn name(&self) -> &str

Returns the canonical name of the command.

source

fn as_any(&self) -> &dyn Any

Retrieve the command as as a std::any::Any reference.

source

fn exec( &self, parent_ctx: &FunctionEnvMut<'_, WasiEnv>, path: &str, store: &mut Option<Store>, config: &mut Option<WasiEnv> ) -> Result<TaskJoinHandle, SpawnError>

Executes the command.

Implementors§