Struct parity_wasm::elements::FuncBody [−][src]
pub struct FuncBody { /* fields omitted */ }
Function body definition.
Methods
impl FuncBody
[src]
impl FuncBody
pub fn new(locals: Vec<Local>, instructions: Instructions) -> Self
[src]
pub fn new(locals: Vec<Local>, instructions: Instructions) -> Self
New function body with given locals
and instructions
pub fn empty() -> Self
[src]
pub fn empty() -> Self
List 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) -> &Instructions
Instruction 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 Instructions
Instruction list of the function body (mutable).
Trait Implementations
impl Debug for FuncBody
[src]
impl Debug for FuncBody
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for FuncBody
[src]
impl Clone for FuncBody
fn clone(&self) -> FuncBody
[src]
fn clone(&self) -> FuncBody
Returns 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 FuncBody
fn eq(&self, other: &FuncBody) -> bool
[src]
fn eq(&self, other: &FuncBody) -> bool
This 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) -> bool
This method tests for !=
.
impl Deserialize for FuncBody
[src]
impl Deserialize for FuncBody
type 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