[−][src]Struct wasm_encoder::ModuleSection
An encoder for the module section.
Note that this is part of the module linking proposal and is not currently part of stable WebAssembly.
Example
use wasm_encoder::{Module, ModuleSection, ValType}; let mut submodules = ModuleSection::new(); let type_index = 0; submodules.module(type_index); let mut module = Module::new(); module.section(&submodules); // Note: this will generate an invalid module because we didn't generate a // module code section containing the function body. See the documentation // for `ModuleCodeSection` for details. let wasm_bytes = module.finish();
Implementations
impl ModuleSection
[src][−]
pub fn new() -> ModuleSection
[src][−]
Construct a new module section encoder.
pub fn module(&mut self, type_index: u32) -> &mut Self
[src][−]
Define a module that uses the given type.
Trait Implementations
impl Section for ModuleSection
[src][+]
Auto Trait Implementations
impl RefUnwindSafe for ModuleSection
[src]
impl Send for ModuleSection
[src]
impl Sync for ModuleSection
[src]
impl Unpin for ModuleSection
[src]
impl UnwindSafe for ModuleSection
[src]
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,
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>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,