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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)