Struct beam_file::chunk::CodeChunk
[−]
[src]
pub struct CodeChunk { pub info_size: u32, pub version: u32, pub opcode_max: u32, pub label_count: u32, pub function_count: u32, pub bytecode: Vec<u8>, }
A representation of the "Code" chunk.
Fields
info_size: u32
Length of the information fields before code.
version: u32
Instruction set version.
opcode_max: u32
The highest opcode used in the code section.
label_count: u32
The number of labels.
function_count: u32
The number of functions.
bytecode: Vec<u8>
The byte code.
Trait Implementations
impl Debug for CodeChunk
[src]
impl PartialEq for CodeChunk
[src]
fn eq(&self, __arg_0: &CodeChunk) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CodeChunk) -> bool
This method tests for !=
.
impl Eq for CodeChunk
[src]
impl Chunk for CodeChunk
[src]
fn id(&self) -> &Id
Returns the identifier of the chunk.
fn decode_data<R: Read>(id: &Id, reader: R) -> Result<Self> where
Self: Sized,
Self: Sized,
Reads a chunk which has the identifier id
from reader
. Read more
fn encode_data<W: Write>(&self, writer: W) -> Result<()>
Writes the data of the chunk to writer
. Read more
fn decode<R: Read>(reader: R) -> Result<Self> where
Self: Sized,
Self: Sized,
Reads a chunk from reader
.
fn encode<W: Write>(&self, writer: W) -> Result<()>
Writes the chunk to writer
.