pub struct Writer { /* private fields */ }
Expand description
A structure used to write out the raw representation of a wasm interface types subsection.
This type performs no validation as items are written, but if you’re just calling the methods of this writer you should always produce a syntatically valid section at least.
Implementations§
Source§impl Writer
impl Writer
Sourcepub fn types(&mut self, cnt: u32) -> Types<'_>
pub fn types(&mut self, cnt: u32) -> Types<'_>
Returns a section writer used to write out the type subsection of a wasm interface types section.
Sourcepub fn imports(&mut self, cnt: u32) -> Imports<'_>
pub fn imports(&mut self, cnt: u32) -> Imports<'_>
Returns a section writer used to write out the import subsection of a wasm interface types section.
Sourcepub fn funcs(&mut self, cnt: u32) -> Funcs<'_>
pub fn funcs(&mut self, cnt: u32) -> Funcs<'_>
Returns a section writer used to write out the function subsection of a wasm interface types section.
Sourcepub fn exports(&mut self, cnt: u32) -> Exports<'_>
pub fn exports(&mut self, cnt: u32) -> Exports<'_>
Returns a section writer used to write out the export subsection of a wasm interface types section.
Sourcepub fn implements(&mut self, cnt: u32) -> Implements<'_>
pub fn implements(&mut self, cnt: u32) -> Implements<'_>
Returns a section writer used to write out the implements subsection of a wasm interface types section.
Sourcepub fn into_payload(self) -> Vec<u8> ⓘ
pub fn into_payload(self) -> Vec<u8> ⓘ
Consumes this writer, returning all bytes written so far.
This will only return the payload of the wasm interface types custom section, not the custom section headers.
Sourcepub fn into_custom_section(self) -> Vec<u8> ⓘ
pub fn into_custom_section(self) -> Vec<u8> ⓘ
Consumes this writer, returning all bytes written so far.