pub struct ComponentAliasSection { /* private fields */ }Available on crate feature
component-model only.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§impl Debug for ComponentAliasSection
impl Debug for ComponentAliasSection
Source§impl Default for ComponentAliasSection
impl Default for ComponentAliasSection
Auto Trait Implementations§
impl Freeze for ComponentAliasSection
impl RefUnwindSafe for ComponentAliasSection
impl Send for ComponentAliasSection
impl Sync for ComponentAliasSection
impl Unpin for ComponentAliasSection
impl UnsafeUnpin 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