Struct golem_wasm_ast::core::Func
source · pub struct Func<Expr: 'static> {
pub type_idx: TypeIdx,
/* private fields */
}
Expand description
The funcs component of a module defines a vector of functions with the following structure.
Functions are referenced through function indices, starting with the smallest index not referencing a function import.
typ
is the type of a function declares its signature by reference to a type defined in the module. The parameters of the
function are referenced through 0-based local indices in the function’s body; they are mutable.
The locals
declare a vector of mutable local variables and their types. These variables are referenced through
local indices in the function’s body. The index of the first local is the smallest index not referencing a
parameter.
The body
is an instruction sequence that upon termination must produce a stack matching the function type’s result
type.
/
Fields§
§type_idx: TypeIdx
Implementations§
Trait Implementations§
source§impl<Expr: PartialEq + 'static> PartialEq for Func<Expr>
impl<Expr: PartialEq + 'static> PartialEq for Func<Expr>
impl<Expr: 'static> StructuralPartialEq for Func<Expr>
Auto Trait Implementations§
impl<Expr> Freeze for Func<Expr>
impl<Expr> !RefUnwindSafe for Func<Expr>
impl<Expr> !Send for Func<Expr>
impl<Expr> !Sync for Func<Expr>
impl<Expr> Unpin for Func<Expr>
impl<Expr> !UnwindSafe for Func<Expr>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)