Struct wasm_encoder::ComponentAliasSection
source · pub struct ComponentAliasSection { /* private fields */ }
Expand description
An encoder for the alias section of WebAssembly component.
§Example
use wasm_encoder::{Component, Alias, ComponentAliasSection, ComponentExportKind, ComponentOuterAliasKind};
let mut aliases = ComponentAliasSection::new();
aliases.alias(Alias::InstanceExport { instance: 0, kind: ComponentExportKind::Func, name: "f" });
aliases.alias(Alias::Outer { count: 0, kind: ComponentOuterAliasKind::Type, index: 1 });
let mut component = Component::new();
component.section(&aliases);
let bytes = component.finish();
Implementations§
Trait Implementations§
source§impl Clone for ComponentAliasSection
impl Clone for ComponentAliasSection
source§fn clone(&self) -> ComponentAliasSection
fn clone(&self) -> ComponentAliasSection
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 ComponentAliasSection
impl Debug for ComponentAliasSection
source§impl Default for ComponentAliasSection
impl Default for ComponentAliasSection
source§fn default() -> ComponentAliasSection
fn default() -> ComponentAliasSection
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ComponentAliasSection
impl Send for ComponentAliasSection
impl Sync for ComponentAliasSection
impl Unpin for ComponentAliasSection
impl UnwindSafe for ComponentAliasSection
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