[−][src]Struct wasm_encoder::AliasSection
An encoder for the alias section.
Note that this is part of the module linking proposal and is not currently part of stable WebAssembly.
Example
use wasm_encoder::{Module, AliasSection, ItemKind}; let mut aliases = AliasSection::new(); aliases.outer_type(0, 2); aliases.instance_export(0, ItemKind::Function, "foo"); let mut module = Module::new(); module.section(&aliases); let wasm_bytes = module.finish();
Implementations
impl AliasSection
[src][−]
pub fn new() -> AliasSection
[src][−]
Construct a new alias section encoder.
pub fn instance_export(
&mut self,
instance: u32,
kind: ItemKind,
name: &str
) -> &mut Self
[src][−]
&mut self,
instance: u32,
kind: ItemKind,
name: &str
) -> &mut Self
Define an alias that references the export of a defined instance.
pub fn outer_type(&mut self, depth: u32, ty: u32) -> &mut Self
[src][−]
Define an alias that references an outer module's type.
pub fn outer_module(&mut self, depth: u32, module: u32) -> &mut Self
[src][−]
Define an alias that references an outer module's module.
Trait Implementations
impl Section for AliasSection
[src][+]
Auto Trait Implementations
impl RefUnwindSafe for AliasSection
[src]
impl Send for AliasSection
[src]
impl Sync for AliasSection
[src]
impl Unpin for AliasSection
[src]
impl UnwindSafe for AliasSection
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,