[−][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, Export}; let mut aliases = AliasSection::new(); aliases.parent_type(2); aliases.instance_export(0, Export::Function(1)); 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, export: Export) -> &mut Self
[src]
Define an alias that references the export of a defined instance.
pub fn parent_type(&mut self, ty: u32) -> &mut Self
[src]
Define an alias that references a parent's type.
pub fn parent_module(&mut self, module: u32) -> &mut Self
[src]
Define an alias that references a parent'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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
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>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,