5#ifndef WASMTIME_TYPES_EXTERN_HH
6#define WASMTIME_TYPES_EXTERN_HH
41 return ref_from_c(ty.raw_type());
48 return ref_from_c(ty.raw_type());
54 case WASM_EXTERN_FUNC:
56 case WASM_EXTERN_GLOBAL:
58 case WASM_EXTERN_TABLE:
60 case WASM_EXTERN_MEMORY:
Non-owning reference to an ExportType.
Definition: export.hh:22
Type information about a WebAssembly export.
Definition: export.hh:16
Generic type of a WebAssembly item.
Definition: extern.hh:22
static Ref from_import(ImportType::Ref ty)
Extract the type of the item imported by the provided type.
Definition: extern.hh:38
std::variant< FuncType::Ref, GlobalType::Ref, TableType::Ref, MemoryType::Ref > Ref
Non-owning reference to an item's type.
Definition: extern.hh:35
static Ref from_export(ExportType::Ref ty)
Extract the type of the item exported by the provided type.
Definition: extern.hh:45
Type information about a WebAssembly import.
Definition: import.hh:16
Non-owning reference to a MemoryType, must not be used after the original owner has been deleted.
Definition: memory.hh:30
An opaque object representing the type of a external value. Can be seen as a superclass of wasm_funct...
const wasm_functype_t * wasm_externtype_as_functype_const(const wasm_externtype_t *)
Attempts to convert a wasm_externtype_t to a wasm_functype_t.
const wasm_globaltype_t * wasm_externtype_as_globaltype_const(const wasm_externtype_t *)
Attempts to convert a wasm_externtype_t to a wasm_globaltype_t.
const wasm_tabletype_t * wasm_externtype_as_tabletype_const(const wasm_externtype_t *)
Attempts to convert a wasm_externtype_t to a wasm_tabletype_t.
wasm_externkind_t wasm_externtype_kind(const wasm_externtype_t *)
Returns the kind of external item this type represents.
const wasm_memorytype_t * wasm_externtype_as_memorytype_const(const wasm_externtype_t *)
Attempts to convert a wasm_externtype_t to a wasm_memorytype_t.