Struct parity_wasm::elements::FuncBody [−][src]
pub struct FuncBody { /* fields omitted */ }Function body definition.
Methods
impl FuncBody[src]
impl FuncBodypub fn new(locals: Vec<Local>, instructions: Instructions) -> Self[src]
pub fn new(locals: Vec<Local>, instructions: Instructions) -> SelfNew function body with given locals and instructions
pub fn empty() -> Self[src]
pub fn empty() -> SelfList of individual instructions
pub fn locals(&self) -> &[Local][src]
pub fn locals(&self) -> &[Local]Locals declared in function body.
pub fn code(&self) -> &Instructions[src]
pub fn code(&self) -> &InstructionsInstruction list of the function body. Minimal instruction list
is just &[Instruction::End]
pub fn locals_mut(&mut self) -> &mut Vec<Local>[src]
pub fn locals_mut(&mut self) -> &mut Vec<Local>Locals declared in function body (mutable).
pub fn code_mut(&mut self) -> &mut Instructions[src]
pub fn code_mut(&mut self) -> &mut InstructionsInstruction list of the function body (mutable).
Trait Implementations
impl Debug for FuncBody[src]
impl Debug for FuncBodyfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for FuncBody[src]
impl Clone for FuncBodyfn clone(&self) -> FuncBody[src]
fn clone(&self) -> FuncBodyReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl PartialEq for FuncBody[src]
impl PartialEq for FuncBodyfn eq(&self, other: &FuncBody) -> bool[src]
fn eq(&self, other: &FuncBody) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &FuncBody) -> bool[src]
fn ne(&self, other: &FuncBody) -> boolThis method tests for !=.
impl Deserialize for FuncBody[src]
impl Deserialize for FuncBodytype Error = Error
Serialization error produced by deserialization routine.
fn deserialize<R: Read>(reader: &mut R) -> Result<Self, Self::Error>[src]
fn deserialize<R: Read>(reader: &mut R) -> Result<Self, Self::Error>Deserialize type from serial i/o
impl Serialize for FuncBody[src]
impl Serialize for FuncBody