pub struct WasmFunc {
pub name: String,
pub params: Vec<(String, WasmType)>,
pub results: Vec<WasmType>,
pub locals: Vec<(String, WasmType)>,
pub body: Vec<WasmInstr>,
}Expand description
A WebAssembly function definition.
Fields§
§name: StringFunction name (used as $name in WAT).
params: Vec<(String, WasmType)>Named parameters with their types: (param $name type).
results: Vec<WasmType>Result types: (result type).
locals: Vec<(String, WasmType)>Named local variables: (local $name type).
body: Vec<WasmInstr>Function body instructions.
Trait Implementations§
impl StructuralPartialEq for WasmFunc
Auto Trait Implementations§
impl Freeze for WasmFunc
impl RefUnwindSafe for WasmFunc
impl Send for WasmFunc
impl Sync for WasmFunc
impl Unpin for WasmFunc
impl UnsafeUnpin for WasmFunc
impl UnwindSafe for WasmFunc
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