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, RefType};
let mut tables = TableSection::new();
tables.table(TableType {
    element_type: RefType::FUNCREF,
    minimum: 128,
    maximum: None,
});
let mut module = Module::new();
module.section(&tables);
let wasm_bytes = module.finish();Implementations§
source§impl TableSection
 
impl TableSection
sourcepub fn table_with_init(
    &mut self,
    table_type: TableType,
    init: &ConstExpr
) -> &mut Self
 
pub fn table_with_init( &mut self, table_type: TableType, init: &ConstExpr ) -> &mut Self
Define a table with an explicit initialization expression.
Note that this is part of the function-references proposal.
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
source§impl Encode for TableSection
 
impl Encode for TableSection
Auto Trait Implementations§
impl RefUnwindSafe for TableSection
impl Send for TableSection
impl Sync for TableSection
impl Unpin for TableSection
impl UnwindSafe for TableSection
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