wasmtime_structref_new function

  1. @Native<Pointer<wasmtime_error_t> Function(Pointer<wasmtime_context_t>, Pointer<wasmtime_struct_ref_pre_t>, Pointer<wasmtime_val_t>, Size, Pointer<wasmtime_structref_t>)>(ffi.Pointer<wasmtime_context_t>, ffi.Pointer<wasmtime_struct_ref_pre_t>, ffi.Pointer<wasmtime_val_t>, ffi.Size, ffi.Pointer<wasmtime_structref_t>)>()
Pointer<wasmtime_error_t> wasmtime_structref_new(
  1. Pointer<wasmtime_context_t> context,
  2. Pointer<wasmtime_struct_ref_pre_t> pre,
  3. Pointer<wasmtime_val_t> fields,
  4. int nfields,
  5. Pointer<wasmtime_structref_t> out,
)

\brief Allocate a new struct instance.

\param context The store context. \param pre The struct pre-allocator. \param fields Pointer to array of field values (#wasmtime_val_t). \param nfields Number of fields (must match the struct type). \param out Receives the new structref on success.

\return NULL on success, or a #wasmtime_error_t on failure.

Implementation

@ffi.Native<
  ffi.Pointer<wasmtime_error_t> Function(
    ffi.Pointer<wasmtime_context_t>,
    ffi.Pointer<wasmtime_struct_ref_pre_t>,
    ffi.Pointer<wasmtime_val_t>,
    ffi.Size,
    ffi.Pointer<wasmtime_structref_t>,
  )
>()
external ffi.Pointer<wasmtime_error_t> wasmtime_structref_new(
  ffi.Pointer<wasmtime_context_t> context,
  ffi.Pointer<wasmtime_struct_ref_pre_t> pre,
  ffi.Pointer<wasmtime_val_t> fields,
  int nfields,
  ffi.Pointer<wasmtime_structref_t> out,
);