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 Freeze for ComponentAliasSection
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