pub trait Section {
    fn id(&self) -> u8;
fn encode<S>(&self, sink: &mut S)
    where
        S: Extend<u8>
; }
Expand description

A WebAssembly section.

Various builders defined in this crate already implement this trait, but you can also implement it yourself for your own custom section builders, or use RawSection to use a bunch of raw bytes as a section.

Required methods

This section’s id.

See SectionId for known section ids.

Write this section’s data and data length prefix into the given sink.

Implementors