wasmparser

Trait Subsection

Source
pub trait Subsection<'a>: Sized {
    // Required method
    fn from_reader(id: u8, reader: BinaryReader<'a>) -> Result<Self>;
}
Expand description

A trait implemented for subsections of another outer section.

This is currently only used for subsections within custom sections, such as the name section of core wasm.

This is used in conjunction with Subsections.

Required Methods§

Source

fn from_reader(id: u8, reader: BinaryReader<'a>) -> Result<Self>

Converts the section identifier provided with the section contents into a typed section

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a> Subsection<'a> for ComponentName<'a>

Available on crate feature component-model only.
Source§

impl<'a> Subsection<'a> for Dylink0Subsection<'a>

Source§

impl<'a> Subsection<'a> for Linking<'a>

Source§

impl<'a> Subsection<'a> for Name<'a>