pub struct AsyncWasiModule(/* private fields */);
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<impl AsRef<str>>>,
envs: Option<Vec<(impl AsRef<str>, impl AsRef<str>)>>,
) -> Result<AsyncWasiModule, Box<WasmEdgeError>>
pub fn create( args: Option<Vec<impl AsRef<str>>>, envs: Option<Vec<(impl AsRef<str>, impl AsRef<str>)>>, ) -> Result<AsyncWasiModule, Box<WasmEdgeError>>
Creates a AsyncWasiModule instance.
§Arguments
-
args
- The commandline arguments. The first argument is the program name. -
envs
- The environment variables.
§Error
If fail to create a AsyncWasiModule instance, then an error is returned.
Sourcepub fn create_from_wasi_context(
wasi_ctx: WasiCtx,
) -> Result<AsyncWasiModule, Box<WasmEdgeError>>
pub fn create_from_wasi_context( wasi_ctx: WasiCtx, ) -> Result<AsyncWasiModule, Box<WasmEdgeError>>
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 AsMut<AsyncImportObject<WasiCtx>> for AsyncWasiModule
impl AsMut<AsyncImportObject<WasiCtx>> for AsyncWasiModule
Source§fn as_mut(&mut self) -> &mut AsyncImportObject<WasiCtx>
fn as_mut(&mut self) -> &mut AsyncImportObject<WasiCtx>
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsRef<AsyncImportObject<WasiCtx>> for AsyncWasiModule
impl AsRef<AsyncImportObject<WasiCtx>> for AsyncWasiModule
Source§fn as_ref(&self) -> &AsyncImportObject<WasiCtx>
fn as_ref(&self) -> &AsyncImportObject<WasiCtx>
Converts this type into a shared reference of the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for AsyncWasiModule
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