5#ifndef WASMTIME_ANYREF_HH
6#define WASMTIME_ANYREF_HH
8#include <wasmtime/_anyref_class.hh>
10#ifdef WASMTIME_FEATURE_GC
12#include <wasmtime/_arrayref_class.hh>
13#include <wasmtime/_eqref_class.hh>
14#include <wasmtime/_structref_class.hh>
19inline bool AnyRef::is_eqref(Store::Context cx)
const {
20 return wasmtime_anyref_is_eqref(cx.capi(), &raw);
22inline bool AnyRef::is_struct(Store::Context cx)
const {
23 return wasmtime_anyref_is_struct(cx.capi(), &raw);
25inline bool AnyRef::is_array(Store::Context cx)
const {
26 return wasmtime_anyref_is_array(cx.capi(), &raw);
28inline std::optional<EqRef> AnyRef::as_eqref(Store::Context cx)
const {
30 if (wasmtime_anyref_as_eqref(cx.capi(), &raw, &out))
34inline std::optional<StructRef> AnyRef::as_struct(Store::Context cx)
const {
36 if (wasmtime_anyref_as_struct(cx.capi(), &raw, &out))
37 return StructRef(out);
40inline std::optional<ArrayRef> AnyRef::as_array(Store::Context cx)
const {
42 if (wasmtime_anyref_as_array(cx.capi(), &raw, &out))
A WebAssembly arrayref value.
Definition: val.h:210
A WebAssembly eqref value.
Definition: val.h:163
A WebAssembly structref value.
Definition: val.h:187