Trait wasmtime_wasi::bindings::cli::environment::Host

source ·
pub trait Host: Send {
    // Required methods
    fn get_environment(&mut self) -> Result<Vec<(String, String)>>;
    fn get_arguments(&mut self) -> Result<Vec<String>>;
    fn initial_cwd(&mut self) -> Result<Option<String>>;
}

Required Methods§

source

fn get_environment(&mut self) -> Result<Vec<(String, String)>>

Get the POSIX-style environment variables.

Each environment variable is provided as a pair of string variable names and string value.

Morally, these are a value import, but until value imports are available in the component model, this import function should return the same values each time it is called.

source

fn get_arguments(&mut self) -> Result<Vec<String>>

Get the POSIX-style arguments to the program.

source

fn initial_cwd(&mut self) -> Result<Option<String>>

Return a path that programs should use as their initial current working directory, interpreting . as shorthand for this.

Implementations on Foreign Types§

source§

impl<_T: Host + ?Sized + Send> Host for &mut _T

source§

fn get_environment(&mut self) -> Result<Vec<(String, String)>>

Get the POSIX-style environment variables.

Each environment variable is provided as a pair of string variable names and string value.

Morally, these are a value import, but until value imports are available in the component model, this import function should return the same values each time it is called.

source§

fn get_arguments(&mut self) -> Result<Vec<String>>

Get the POSIX-style arguments to the program.

source§

fn initial_cwd(&mut self) -> Result<Option<String>>

Return a path that programs should use as their initial current working directory, interpreting . as shorthand for this.

Implementors§

source§

impl<T> Host for WasiImpl<T>
where T: WasiView,