Struct wasm_encoder::ComponentExportSection
source · pub struct ComponentExportSection { /* private fields */ }
Expand description
An encoder for the export section of WebAssembly component.
Example
use wasm_encoder::{Component, ComponentExportSection, ComponentExportKind};
// This exports a function named "foo"
let mut exports = ComponentExportSection::new();
exports.export("foo", "", ComponentExportKind::Func, 0);
let mut component = Component::new();
component.section(&exports);
let bytes = component.finish();
Implementations§
Trait Implementations§
source§impl Clone for ComponentExportSection
impl Clone for ComponentExportSection
source§fn clone(&self) -> ComponentExportSection
fn clone(&self) -> ComponentExportSection
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 ComponentExportSection
impl Debug for ComponentExportSection
source§impl Default for ComponentExportSection
impl Default for ComponentExportSection
source§fn default() -> ComponentExportSection
fn default() -> ComponentExportSection
Returns the “default value” for a type. Read more