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

Method table_set_element

crates/debugger/src/host/opaque.rs:400–410  ·  view source on GitHub ↗
(&mut self, table: Table, index: u64, val: WasmValue)

Source from the content-addressed store, hash-verified

398 }
399
400 async fn table_set_element(&mut self, table: Table, index: u64, val: WasmValue) -> Result<()> {
401 self.with_store(move |mut store| -> Result<()> {
402 let v = val.into_val(&mut store);
403 let r = v.ref_().ok_or(wit::Error::MismatchedType)?;
404 table
405 .set(&mut store, index, r)
406 .map_err(|_| wit::Error::MismatchedType)?;
407 Ok(())
408 })
409 .await?
410 }
411
412 async fn func_params(&mut self, func: Func) -> Result<Vec<wit::WasmType>> {
413 self.with_store(move |store| {

Callers 1

set_elementMethod · 0.80

Calls 5

OkFunction · 0.85
with_storeMethod · 0.80
ref_Method · 0.80
into_valMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected