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

Class ArrayType

crates/c-api/include/wasmtime/types/arrayref.hh:18–33  ·  view source on GitHub ↗

* \brief Owned handle to a WebAssembly array type definition. */

Source from the content-addressed store, hash-verified

16 * \brief Owned handle to a WebAssembly array type definition.
17 */
18class ArrayType {
19/// Bridge the various naming conventions here.
20#define wasmtime_array_type_clone wasmtime_array_type_copy
21 WASMTIME_CLONE_WRAPPER(ArrayType, wasmtime_array_type)
22#undef wasmtime_array_type_clone
23
24 /// Create a new array type with the given element type.
25 ArrayType(const Engine &engine, const FieldType &field)
26 : ArrayType(wasmtime_array_type_new(engine.capi(), field.capi())) {}
27
28 FieldType element_type() const {
29 wasmtime_field_type_t ty;
30 wasmtime_array_type_element(capi(), &ty);
31 return FieldType(ty);
32 }
33};
34
35} // namespace wasmtime
36

Callers 3

HeapTypeMethod · 0.70
TESTFunction · 0.50
tyMethod · 0.50

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.40