5#ifndef WASMTIME_EQREF_HH
6#define WASMTIME_EQREF_HH
8#include <wasmtime/_eqref_class.hh>
10#ifdef WASMTIME_FEATURE_GC
12#include <wasmtime/_anyref_class.hh>
13#include <wasmtime/_arrayref_class.hh>
14#include <wasmtime/_structref_class.hh>
21 return StructRef(out);
25inline std::optional<ArrayRef>
EqRef::as_array(Store::Context cx)
const {
std::optional< ArrayRef > as_array(Store::Context cx) const
Downcast this eqref into an arrayref.
std::optional< StructRef > as_struct(Store::Context cx) const
Downcast this eqref into a structref.
AnyRef to_anyref() const
Upcast this eqref to an anyref.
WASM_API_EXTERN void wasmtime_eqref_to_anyref(const wasmtime_eqref_t *eqref, wasmtime_anyref_t *out)
Upcast an eqref to an anyref.
WASM_API_EXTERN bool wasmtime_eqref_as_struct(wasmtime_context_t *context, const wasmtime_eqref_t *eqref, wasmtime_structref_t *out)
Downcast an eqref to a structref.
WASM_API_EXTERN bool wasmtime_eqref_as_array(wasmtime_context_t *context, const wasmtime_eqref_t *eqref, wasmtime_arrayref_t *out)
Downcast an eqref to an arrayref.
A WebAssembly value in the any hierarchy of GC types.
Definition: val.h:77
A WebAssembly arrayref value.
Definition: val.h:210
A WebAssembly structref value.
Definition: val.h:187