pub struct Function {
pub value: ValueId,
pub blocks: usize,
pub instructions: Vec<Instruction>,
pub first: ValueId,
pub locals: Vec<Value>,
pub local_types: Vec<TypeId>,
pub attachments: Vec<Attachment>,
}Expand description
A function body.
Fields§
§value: ValueIdThe function’s module value id.
blocks: usizeThe number of basic blocks.
instructions: Vec<Instruction>The instructions of all blocks, in order.
first: ValueIdThe body’s own values (arguments, constants, instruction results) and their types; their ids start at
first, after the module’s values.
locals: Vec<Value>The values of the body.
local_types: Vec<TypeId>The types of Function::locals.
attachments: Vec<Attachment>The metadata attached to the function itself (the attachment records of the body that name no instruction).
Trait Implementations§
impl StructuralPartialEq for Function
Auto Trait Implementations§
impl Freeze for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnsafeUnpin for Function
impl UnwindSafe for Function
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