wasmtime_func_call_async function
- @Native<Pointer<
wasmtime_call_future_t> Function(Pointer<wasmtime_context_t> , Pointer<wasmtime_func_t> , Pointer<wasmtime_val_t> , Size, Pointer<wasmtime_val_t> , Size, Pointer<Pointer< , Pointer<wasm_trap_t> >Pointer< )>(ffi.Pointer<wasmtime_context_t>, ffi.Pointer<wasmtime_func_t>, ffi.Pointer<wasmtime_val_t>, ffi.Size, ffi.Pointer<wasmtime_val_t>, ffi.Size, ffi.Pointer<ffi.Pointer<wasm_trap_t>>, ffi.Pointer<ffi.Pointer<wasmtime_error_t>>)>()wasmtime_error_t> >
- Pointer<
wasmtime_context_t> context, - Pointer<
wasmtime_func_t> func, - Pointer<
wasmtime_val_t> args, - int nargs,
- Pointer<
wasmtime_val_t> results, - int nresults,
- Pointer<
Pointer< trap_ret,wasm_trap_t> > - Pointer<
Pointer< error_ret,wasmtime_error_t> >
\brief Invokes this function with the params given, returning the results asynchronously.
This function is the same as wasmtime_func_call except that it is asynchronous. This is only compatible with stores associated with an asynchronous config.
The result is a future that is owned by the caller and must be deleted via #wasmtime_call_future_delete.
The args and results pointers may be NULL if the corresponding length
is zero. The trap_ret and error_ret pointers may not be NULL.
Does not take ownership of #wasmtime_val_t arguments or #wasmtime_val_t results, and all parameters to this function must be kept alive and not modified until the returned #wasmtime_call_future_t is deleted. This includes the context and store parameters. Only a single future can be alive for a given store at a single time (meaning only call this function after the previous call's future was deleted).
See the header documentation for for more information.
For more information see the Rust documentation at https://docs.wasmtime.dev/api/wasmtime/struct.Func.html#method.call_async
Implementation
@ffi.Native<
ffi.Pointer<wasmtime_call_future_t> Function(
ffi.Pointer<wasmtime_context_t>,
ffi.Pointer<wasmtime_func_t>,
ffi.Pointer<wasmtime_val_t>,
ffi.Size,
ffi.Pointer<wasmtime_val_t>,
ffi.Size,
ffi.Pointer<ffi.Pointer<wasm_trap_t>>,
ffi.Pointer<ffi.Pointer<wasmtime_error_t>>,
)
>()
external ffi.Pointer<wasmtime_call_future_t> wasmtime_func_call_async(
ffi.Pointer<wasmtime_context_t> context,
ffi.Pointer<wasmtime_func_t> func,
ffi.Pointer<wasmtime_val_t> args,
int nargs,
ffi.Pointer<wasmtime_val_t> results,
int nresults,
ffi.Pointer<ffi.Pointer<wasm_trap_t>> trap_ret,
ffi.Pointer<ffi.Pointer<wasmtime_error_t>> error_ret,
);