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§
Source§impl Clone for FunctionSection
impl Clone for FunctionSection
Source§fn clone(&self) -> FunctionSection
fn clone(&self) -> FunctionSection
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FunctionSection
impl Debug for FunctionSection
Source§impl Default for FunctionSection
impl Default for FunctionSection
Source§fn default() -> FunctionSection
fn default() -> FunctionSection
Returns the “default value” for a type. Read more
Source§impl Encode for FunctionSection
impl Encode for FunctionSection
Auto Trait Implementations§
impl Freeze for FunctionSection
impl RefUnwindSafe for FunctionSection
impl Send for FunctionSection
impl Sync for FunctionSection
impl Unpin for FunctionSection
impl UnwindSafe for FunctionSection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more