5#ifndef WASMTIME_EXTERNREF_HH
6#define WASMTIME_EXTERNREF_HH
8#include <wasmtime/_externref_class.hh>
10#ifdef WASMTIME_FEATURE_GC
12#include <wasmtime/_func_class.hh>
18template <>
struct detail::WasmType<std::optional<ExternRef>> {
19 static const bool valid =
true;
22 std::optional<ExternRef> &&ref) {
30 const std::optional<ExternRef> &ref) {
38 static std::optional<ExternRef> load(Store::Context cx,
45 return ExternRef(val);
static ValType externref()
Convenience constructor for the externref value type.
Definition: types/_val_class.hh:140
WASM_API_EXTERN void wasmtime_externref_from_raw(wasmtime_context_t *context, uint32_t raw, wasmtime_externref_t *out)
Converts a raw externref value coming from wasmtime_val_raw_t into a wasmtime_externref_t.
A host-defined un-forgeable reference to pass into WebAssembly.
Definition: val.h:136
Container for possible wasm values.
Definition: val.h:290
uint32_t externref
Definition: val.h:327