[−][src]Struct wasm_encoder::ExportSection
An encoder for the export section.
Example
use wasm_encoder::{ Export, ExportSection, TableSection, TableType, Limits, Module, ValType, }; let mut tables = TableSection::new(); tables.table(TableType { element_type: ValType::FuncRef, limits: Limits { min: 128, max: None, }, }); let mut exports = ExportSection::new(); exports.export("my-table", Export::Table(0)); let mut module = Module::new(); module .section(&tables) .section(&exports); let wasm_bytes = module.finish();
Implementations
impl ExportSection
[src]
pub fn new() -> ExportSection
[src]
Create a new export section encoder.
pub fn export(&mut self, name: &str, export: Export) -> &mut Self
[src]
Define an export.
Trait Implementations
impl Section for ExportSection
[src]
Auto Trait Implementations
impl RefUnwindSafe for ExportSection
impl Send for ExportSection
impl Sync for ExportSection
impl Unpin for ExportSection
impl UnwindSafe for ExportSection
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>,