wasm/execution/runtime_structure/
element_instances.rs

1use alloc::vec::Vec;
2
3use crate::{Ref, RefType};
4
5#[derive(Clone, Debug)]
6/// <https://webassembly.github.io/spec/core/exec/runtime.html#element-instances>
7pub struct ElemInst {
8    pub _ty: RefType,
9    pub references: Vec<Ref>,
10}
11
12impl ElemInst {
13    pub fn len(&self) -> usize {
14        self.references.len()
15    }
16}