Struct wasm_encoder::ComponentStartSection
source · [−]pub struct ComponentStartSection<A> {
pub function_index: u32,
pub args: A,
}
Expand description
An encoder for the start section of WebAssembly components.
Example
use wasm_encoder::{Component, ComponentStartSection};
let start = ComponentStartSection { function_index: 0, args: [] };
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.
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 more
sourceimpl<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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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