[][src]Struct wasm_encoder::ModuleSection

pub struct ModuleSection { /* fields omitted */ }

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::{ModuleSection, Module};

let mut modules = ModuleSection::new();
modules.module(&Module::new());
modules.module(&Module::new());

let mut module = Module::new();
module.section(&modules);

let wasm_bytes = module.finish();

Implementations

impl ModuleSection[src]

pub fn new() -> ModuleSection[src]

Create a new code section encoder.

pub fn module(&mut self, module: &Module) -> &mut Self[src]

Writes a dmodule into this module code section.

Trait Implementations

impl Section for ModuleSection[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.