Struct wasm_encoder::TableSection
source · pub struct TableSection { /* private fields */ }
Expand description
An encoder for the table section.
Table sections are only supported for modules.
Example
use wasm_encoder::{Module, TableSection, TableType, ValType};
let mut tables = TableSection::new();
tables.table(TableType {
element_type: ValType::FuncRef,
minimum: 128,
maximum: None,
});
let mut module = Module::new();
module.section(&tables);
let wasm_bytes = module.finish();
Implementations§
source§impl TableSection
impl TableSection
Trait Implementations§
source§impl Clone for TableSection
impl Clone for TableSection
source§fn clone(&self) -> TableSection
fn clone(&self) -> TableSection
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 TableSection
impl Debug for TableSection
source§impl Default for TableSection
impl Default for TableSection
source§fn default() -> TableSection
fn default() -> TableSection
Returns the “default value” for a type. Read more