Struct wasmedge_sys::async::module::AsyncWasiModule
source · pub struct AsyncWasiModule { /* private fields */ }
Available on crate feature
async
and Linux only.Expand description
A AsyncWasiModule is a module instance for the WASI specification and used in the async
scenario.
Implementations§
source§impl AsyncWasiModule
impl AsyncWasiModule
sourcepub fn create(
args: Option<Vec<&str>>,
envs: Option<Vec<(&str, &str)>>,
preopens: Option<Vec<(PathBuf, PathBuf)>>
) -> WasmEdgeResult<Self>
pub fn create( args: Option<Vec<&str>>, envs: Option<Vec<(&str, &str)>>, preopens: Option<Vec<(PathBuf, PathBuf)>> ) -> WasmEdgeResult<Self>
Creates a AsyncWasiModule instance.
Arguments
-
args
- The commandline arguments. The first argument is the program name. -
envs
- The environment variables. -
preopens
- The directories to pre-open.
Error
If fail to create a AsyncWasiModule instance, then an error is returned.
sourcepub fn create_from_wasi_context(wasi_ctx: WasiCtx) -> WasmEdgeResult<Self>
pub fn create_from_wasi_context(wasi_ctx: WasiCtx) -> WasmEdgeResult<Self>
Creates a AsyncWasiModule instance with the given wasi context.
Arguments
wasi_ctx
- The WasiCtx instance.
Error
If fail to create AsyncWasiModule instance, then an error is returned.
Trait Implementations§
source§impl Clone for AsyncWasiModule
impl Clone for AsyncWasiModule
source§fn clone(&self) -> AsyncWasiModule
fn clone(&self) -> AsyncWasiModule
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AsyncWasiModule
impl Debug for AsyncWasiModule
Auto Trait Implementations§
impl !RefUnwindSafe for AsyncWasiModule
impl Send for AsyncWasiModule
impl Sync for AsyncWasiModule
impl Unpin for AsyncWasiModule
impl !UnwindSafe for AsyncWasiModule
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more