pub trait AsyncHostFunction<T, Args, Rets, Kind>where
Args: WasmTypeList + 'static,
Rets: WasmTypeList,
Kind: HostFunctionKind,{
// Required method
fn call_async(
&self,
env: AsyncFunctionEnv<T, Kind>,
args: Args,
) -> Pin<Box<dyn Future<Output = Result<Rets, RuntimeError>>>>;
}Expand description
Async counterpart to HostFunction.
Required Methods§
Sourcefn call_async(
&self,
env: AsyncFunctionEnv<T, Kind>,
args: Args,
) -> Pin<Box<dyn Future<Output = Result<Rets, RuntimeError>>>>
fn call_async( &self, env: AsyncFunctionEnv<T, Kind>, args: Args, ) -> Pin<Box<dyn Future<Output = Result<Rets, RuntimeError>>>>
Invoke the host function asynchronously.