pub trait Host: Send + Send {
// Required methods
fn get_environment(
&mut self,
) -> impl Future<Output = Result<Vec<(String, String)>>> + Send;
fn get_arguments(
&mut self,
) -> impl Future<Output = Result<Vec<String>>> + Send;
fn initial_cwd(
&mut self,
) -> impl Future<Output = Result<Option<String>>> + Send;
}
Required Methods§
Sourcefn get_environment(
&mut self,
) -> impl Future<Output = Result<Vec<(String, String)>>> + Send
fn get_environment( &mut self, ) -> impl Future<Output = Result<Vec<(String, String)>>> + Send
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.
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.
Implementations on Foreign Types§
Source§impl<_T: Host + ?Sized + Send> Host for &mut _T
impl<_T: Host + ?Sized + Send> Host for &mut _T
Source§async fn get_environment(&mut self) -> Result<Vec<(String, String)>>
async 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.