MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / set

Method set

crates/tinywasm/src/reference.rs:404–408  ·  view source on GitHub ↗

Set a table element.

(&self, store: &mut Store, index: TableAddr, value: WasmValue)

Source from the content-addressed store, hash-verified

402
403 /// Set a table element.
404 pub fn set(&self, store: &mut Store, index: TableAddr, value: WasmValue) -> Result<(), Trap> {
405 let table = self.instance_mut(store)?;
406 let value = table_value_to_element(table.kind.element_type, value)?;
407 table.set(index, value)
408 }
409
410 /// Copy elements within the same table.
411 pub fn copy_within(&self, store: &mut Store, src: usize, dst: usize, len: usize) -> Result<(), Trap> {

Callers 2

global_setMethod · 0.45

Calls 2

table_value_to_elementFunction · 0.85
instance_mutMethod · 0.80

Tested by 1