Struct wasm_encoder::ComponentStartSection
source · Expand description
An encoder for the start section of WebAssembly components.
Example
use wasm_encoder::{Component, ComponentStartSection};
let start = ComponentStartSection { function_index: 0, args: [0, 1], results: 1 };
let mut component = Component::new();
component.section(&start);
let bytes = component.finish();
Fields
function_index: u32
The index to the start function.
args: A
The arguments to pass to the start function.
An argument is an index to a value.
results: u32
The number of expected results for the start function.
This should match the number of results for the type of
the function referenced by function_index
.
Trait Implementations
sourceimpl<A: Clone> Clone for ComponentStartSection<A>
impl<A: Clone> Clone for ComponentStartSection<A>
sourcefn clone(&self) -> ComponentStartSection<A>
fn clone(&self) -> ComponentStartSection<A>
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<A> ComponentSection for ComponentStartSection<A>where
A: AsRef<[u32]>,
impl<A> ComponentSection for ComponentStartSection<A>where
A: AsRef<[u32]>,
sourceimpl<A: Debug> Debug for ComponentStartSection<A>
impl<A: Debug> Debug for ComponentStartSection<A>
Auto Trait Implementations
impl<A> RefUnwindSafe for ComponentStartSection<A>where
A: RefUnwindSafe,
impl<A> Send for ComponentStartSection<A>where
A: Send,
impl<A> Sync for ComponentStartSection<A>where
A: Sync,
impl<A> Unpin for ComponentStartSection<A>where
A: Unpin,
impl<A> UnwindSafe for ComponentStartSection<A>where
A: UnwindSafe,
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