Struct wasm_encoder::ComponentStartSection
source · pub struct ComponentStartSection<A> {
pub function_index: u32,
pub args: A,
pub results: u32,
}
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§
source§impl<A: Clone> Clone for ComponentStartSection<A>
impl<A: Clone> Clone for ComponentStartSection<A>
source§fn clone(&self) -> ComponentStartSection<A>
fn clone(&self) -> ComponentStartSection<A>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<A> ComponentSection for ComponentStartSection<A>
impl<A> ComponentSection for ComponentStartSection<A>
source§impl<A: Debug> Debug for ComponentStartSection<A>
impl<A: Debug> Debug for ComponentStartSection<A>
Auto Trait Implementations§
impl<A> Freeze for ComponentStartSection<A>where
A: Freeze,
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)