Struct parity_wasm::elements::FuncBody
source · pub struct FuncBody { /* private fields */ }
Expand description
Function body definition.
Implementations
sourceimpl FuncBody
impl FuncBody
sourcepub fn new(locals: Vec<Local>, instructions: Instructions) -> Self
pub fn new(locals: Vec<Local>, instructions: Instructions) -> Self
New function body with given locals
and instructions
.
sourcepub fn code(&self) -> &Instructions
pub fn code(&self) -> &Instructions
Instruction list of the function body. Minimal instruction list
is just &[Instruction::End]
sourcepub fn locals_mut(&mut self) -> &mut Vec<Local>
pub fn locals_mut(&mut self) -> &mut Vec<Local>
Locals declared in function body (mutable).
sourcepub fn code_mut(&mut self) -> &mut Instructions
pub fn code_mut(&mut self) -> &mut Instructions
Instruction list of the function body (mutable).
Trait Implementations
sourceimpl Deserialize for FuncBody
impl Deserialize for FuncBody
impl StructuralPartialEq for FuncBody
Auto Trait Implementations
impl RefUnwindSafe for FuncBody
impl Send for FuncBody
impl Sync for FuncBody
impl Unpin for FuncBody
impl UnwindSafe for FuncBody
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more