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