[−][src]Struct wasm_encoder::ModuleCodeSection
An encoder for the module code section.
Note that this is part of the module linking proposal and is not currently part of stable WebAssembly.
Example
use wasm_encoder::{ ModuleCodeSection, Function, ModuleSection, Instruction, Module, TypeSection, ValType }; let mut types = TypeSection::new(); types.module(vec![], vec![]); let mut modules = ModuleSection::new(); let type_index = 0; modules.module(type_index); let mut module_code = ModuleCodeSection::new(); module_code.module(&Module::new()); let mut module = Module::new(); module .section(&types) .section(&modules) .section(&module_code); let wasm_bytes = module.finish();
Implementations
impl ModuleCodeSection
[src]
pub fn new() -> ModuleCodeSection
[src]
Create a new code section encoder.
pub fn module(&mut self, module: &Module) -> &mut Self
[src]
Write a function body into this code section.
Trait Implementations
impl Section for ModuleCodeSection
[src]
Auto Trait Implementations
impl RefUnwindSafe for ModuleCodeSection
impl Send for ModuleCodeSection
impl Sync for ModuleCodeSection
impl Unpin for ModuleCodeSection
impl UnwindSafe for ModuleCodeSection
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,