pub struct Start { /* private fields */ }Expand description
The ๐๐๐บ๐๐ component of a module declares the function index of a start function that is automatically invoked when the module is instantiated, after tables and memories have been initialized. start::={๐ฟ๐๐๐ผ funcidx}
See https://webassembly.github.io/spec/core/syntax/modules.html#start-function
ยงExamples
use wasm_ast::Start;
assert_eq!(Start::new(0).function(), 0);Implementationsยง
Sourceยงimpl Start
impl Start
Sourcepub fn new(function: FunctionIndex) -> Self
pub fn new(function: FunctionIndex) -> Self
Creates a new instance of Start referencing the given function.
Sourcepub fn function(&self) -> FunctionIndex
pub fn function(&self) -> FunctionIndex
The index of the function to run at module instantiation.
Trait Implementationsยง
impl Copy for Start
impl Eq for Start
impl StructuralPartialEq for Start
Auto Trait Implementationsยง
impl Freeze for Start
impl RefUnwindSafe for Start
impl Send for Start
impl Sync for Start
impl Unpin for Start
impl UnwindSafe for Start
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