Struct wasm_encoder::FunctionSection
source · pub struct FunctionSection { /* private fields */ }
Expand description
An encoder for the function section of WebAssembly modules.
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 bytes = module.finish();
Implementations
Trait Implementations
sourceimpl Clone for FunctionSection
impl Clone for FunctionSection
sourcefn clone(&self) -> FunctionSection
fn clone(&self) -> FunctionSection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for FunctionSection
impl Debug for FunctionSection
sourceimpl Default for FunctionSection
impl Default for FunctionSection
sourcefn default() -> FunctionSection
fn default() -> FunctionSection
Returns the “default value” for a type. Read more
sourceimpl Encode for FunctionSection
impl Encode for FunctionSection
Auto Trait Implementations
impl RefUnwindSafe for FunctionSection
impl Send for FunctionSection
impl Sync for FunctionSection
impl Unpin for FunctionSection
impl UnwindSafe for FunctionSection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more