wasmtime_struct_type_new function

  1. @Native<Pointer<wasmtime_struct_type_t> Function(Pointer<wasm_engine_t>, Pointer<wasmtime_field_type_t>, Size)>(ffi.Pointer<wasm_engine_t>, ffi.Pointer<wasmtime_field_type_t>, ffi.Size)>()
Pointer<wasmtime_struct_type_t> wasmtime_struct_type_new(
  1. Pointer<wasm_engine_t> engine,
  2. Pointer<wasmtime_field_type_t> fields,
  3. int nfields
)

\brief Create a new struct type.

\param engine The engine to register the type with. \param fields Pointer to an array of field type descriptors. \param nfields Number of fields.

\return Returns a new struct type, or NULL on error (e.g. invalid field types).

Implementation

@ffi.Native<
  ffi.Pointer<wasmtime_struct_type_t> Function(
    ffi.Pointer<wasm_engine_t>,
    ffi.Pointer<wasmtime_field_type_t>,
    ffi.Size,
  )
>()
external ffi.Pointer<wasmtime_struct_type_t> wasmtime_struct_type_new(
  ffi.Pointer<wasm_engine_t> engine,
  ffi.Pointer<wasmtime_field_type_t> fields,
  int nfields,
);