set method

void set(
  1. int index,
  2. Object? value
)

Stores value at index.

Implementation

void set(int index, Object? value) => scoped((arena) {
  final kind = type.element;
  final slot = arena<c.wasmtime_val_t>();
  writeValue(slot, kind, toNativeValue(kind, value));
  throwIfError(
    c.wasmtime_table_set(store.context, _native(arena), index, slot),
  );
});