Trait golem_wasm_ast::SectionType

source ·
pub trait SectionType: Debug + PartialEq + Eq + PartialOrd + Ord {
    // Required method
    fn allow_grouping(&self) -> bool;
}
Expand description

Section type defines the type of a section in a WASM binary

This is used to group sections by their type (for example to get all the functions in a module) and also to determine whether a given section type supports grouping.

Required Methods§

source

fn allow_grouping(&self) -> bool

If a section type supports grouping, then sections of the same type next to each other will be serialized into a single WASM section containing multiple elements when writing out a WASM binary.

Some section types does not support this encoding (such as the core::Start or core::Custom sections), in these cases they are all serialized into their own section.

Object Safety§

This trait is not object safe.

Implementors§