wasmtime_instance_export_nth function

  1. @Native<Bool Function(Pointer<wasmtime_context_t>, Pointer<wasmtime_instance_t>, Size, Pointer<Pointer<wasm_byte_t>>, Pointer<Size>, Pointer<wasmtime_extern_t>)>(ffi.Pointer<wasmtime_context_t>, ffi.Pointer<wasmtime_instance_t>, ffi.Size, ffi.Pointer<ffi.Pointer<ffi.Char>>, ffi.Pointer<ffi.Size>, ffi.Pointer<wasmtime_extern_t>)>()
bool wasmtime_instance_export_nth(
  1. Pointer<wasmtime_context_t> store,
  2. Pointer<wasmtime_instance_t> instance,
  3. int index,
  4. Pointer<Pointer<wasm_byte_t>> name,
  5. Pointer<Size> name_len,
  6. Pointer<wasmtime_extern_t> item,
)

\brief Get an export by index from an instance.

\param store the store that owns instance \param instance the instance to lookup within \param index the index to lookup \param name where to store the name of the export \param name_len where to store the byte length of the name \param item where to store the export itself

Returns nonzero if the export was found, and name, name_len, and item are filled in. Otherwise returns 0.

Doesn't take ownership of any arguments but does return ownership of the #wasmtime_extern_t. The name pointer return value is owned by the store and must be immediately used before calling any other APIs on #wasmtime_context_t.

Implementation

@ffi.Native<
  ffi.Bool Function(
    ffi.Pointer<wasmtime_context_t>,
    ffi.Pointer<wasmtime_instance_t>,
    ffi.Size,
    ffi.Pointer<ffi.Pointer<ffi.Char>>,
    ffi.Pointer<ffi.Size>,
    ffi.Pointer<wasmtime_extern_t>,
  )
>()
external bool wasmtime_instance_export_nth(
  ffi.Pointer<wasmtime_context_t> store,
  ffi.Pointer<wasmtime_instance_t> instance,
  int index,
  ffi.Pointer<ffi.Pointer<ffi.Char>> name,
  ffi.Pointer<ffi.Size> name_len,
  ffi.Pointer<wasmtime_extern_t> item,
);