Trait golem_wasm_ast::IndexSpace

source ·
pub trait IndexSpace: Debug + PartialEq + Eq + PartialOrd + Ord {
    type Index: From<u32> + Into<u32> + Copy + Eq + Hash;
}
Expand description

An index space defines one of the possible indexes various WASM nodes can belong to.

In many cases, espacially in the core WASM AST, each top-level WASM node (such as data, memory, type, etc.) has its own index space. Indexes to these nodes are represented by unsigned integers, and each index space are independent from each other.

In the component model many top-level AST nodes are mapped to multiple index spaces depending on their contents. For example a component::ComponentImport node can import a module, a function, a value, a type, an instance or a component - each of these defining an entity in a different index space.

Required Associated Types§

Object Safety§

This trait is not object safe.

Implementors§