Struct wasm_encoder::FunctionSection [−][src]
pub struct FunctionSection { /* fields omitted */ }Expand description
An encoder for the function section.
Example
use wasm_encoder::{Module, FunctionSection, ValType}; let mut functions = FunctionSection::new(); let type_index = 0; functions.function(type_index); let mut module = Module::new(); module.section(&functions); // Note: this will generate an invalid module because we didn't generate a // code section containing the function body. See the documentation for // `CodeSection` for details. let wasm_bytes = module.finish();
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FunctionSectionimpl Send for FunctionSectionimpl Sync for FunctionSectionimpl Unpin for FunctionSectionimpl UnwindSafe for FunctionSectionBlanket Implementations
Mutably borrows from an owned value. Read more