[−][src]Struct wasm_encoder::InstanceSection
An encoder for the instance section.
Note that this is part of the module linking proposal and is not currently part of stable WebAssembly.
Example
use wasm_encoder::{Module, InstanceSection, Export}; let mut instances = InstanceSection::new(); instances.instantiate(0, vec![ Export::Function(0), Export::Module(2), Export::Global(0), ]); let mut module = Module::new(); module.section(&instances); let wasm_bytes = module.finish();
Implementations
impl InstanceSection
[src]
pub fn new() -> InstanceSection
[src]
Construct a new instance section encoder.
pub fn instantiate<I>(&mut self, module: u32, args: I) -> &mut Self where
I: IntoIterator<Item = Export>,
I::IntoIter: ExactSizeIterator,
[src]
I: IntoIterator<Item = Export>,
I::IntoIter: ExactSizeIterator,
Define an instantiation of the given module with the given items as arguments to the instantiation.
Trait Implementations
impl Section for InstanceSection
[src]
Auto Trait Implementations
impl RefUnwindSafe for InstanceSection
[src]
impl Send for InstanceSection
[src]
impl Sync for InstanceSection
[src]
impl Unpin for InstanceSection
[src]
impl UnwindSafe for InstanceSection
[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>,