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

Method len

crates/c-api/include/wasmtime/_arrayref_class.hh:52–58  ·  view source on GitHub ↗

Get the length of the array.

Source from the content-addressed store, hash-verified

50
51 /// Get the length of the array.
52 Result<uint32_t> len(Store::Context cx) const {
53 uint32_t out;
54 auto *err = wasmtime_arrayref_len(cx.capi(), &raw, &out);
55 if (err)
56 return Result<uint32_t>(Error(err));
57 return Result<uint32_t>(out);
58 }
59
60 /// Read an element from the array.
61 Result<Val> get(Store::Context cx, uint32_t index) const;

Callers 15

create_functionFunction · 0.45
translate_argsFunction · 0.45
wasm_func_callFunction · 0.45
wasm_func_param_arityFunction · 0.45
wasm_func_result_arityFunction · 0.45
c_callback_to_rust_fnFunction · 0.45
wasmtime_arrayref_lenFunction · 0.45
invoke_c_async_callbackFunction · 0.45
do_func_call_asyncFunction · 0.45

Calls 3

wasmtime_arrayref_lenFunction · 0.85
ErrorClass · 0.70
capiMethod · 0.45

Tested by 1

TESTFunction · 0.36