MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / set

Method set

crates/c-api/include/wasmtime/table.hh:82–89  ·  view source on GitHub ↗

Stores a value into the specified index in this table. Returns an error if `idx` is out of bounds or if `val` has the wrong type.

Source from the content-addressed store, hash-verified

80 ///
81 /// Returns an error if `idx` is out of bounds or if `val` has the wrong type.
82 Result<std::monostate> set(Store::Context cx, uint64_t idx,
83 const Val &val) const {
84 auto *error = wasmtime_table_set(cx.ptr, &table, idx, &val.val);
85 if (error != nullptr) {
86 return Error(error);
87 }
88 return std::monostate();
89 }
90
91 /// Grow this table.
92 ///

Callers

nothing calls this directly

Calls 2

wasmtime_table_setFunction · 0.85
ErrorClass · 0.70

Tested by

no test coverage detected