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, ComponentAliasSection, ComponentExportKind, ComponentOuterAliasKind};
let mut aliases = ComponentAliasSection::new();
aliases.instance_export(0, ComponentExportKind::Func, "f");
aliases.outer(0, ComponentOuterAliasKind::Type, 1);
let mut component = Component::new();
component.section(&aliases);
let bytes = component.finish();
Implementations
sourceimpl ComponentAliasSection
impl ComponentAliasSection
sourcepub fn instance_export(
&mut self,
instance_index: u32,
kind: ComponentExportKind,
name: &str
) -> &mut Self
pub fn instance_export(
&mut self,
instance_index: u32,
kind: ComponentExportKind,
name: &str
) -> &mut Self
Define an alias to a component instance’s export.
sourcepub fn core_instance_export(
&mut self,
instance_index: u32,
kind: ExportKind,
name: &str
) -> &mut Self
pub fn core_instance_export(
&mut self,
instance_index: u32,
kind: ExportKind,
name: &str
) -> &mut Self
Define an alias to a core instance’s export.
Trait Implementations
sourceimpl Clone for ComponentAliasSection
impl Clone for ComponentAliasSection
sourcefn clone(&self) -> ComponentAliasSection
fn clone(&self) -> ComponentAliasSection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ComponentAliasSection
impl Debug for ComponentAliasSection
sourceimpl Default for ComponentAliasSection
impl Default for ComponentAliasSection
sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more