Struct ketos::bytecode::CodeReader
[−]
[src]
pub struct CodeReader<'a> { /* fields omitted */ }
Reads Instruction
values from a stream of bytes.
Methods
impl<'a> CodeReader<'a>
[src]
fn new(bytes: &[u8], offset: usize) -> CodeReader
Creates a new CodeReader
wrapping a series of bytes.
The first instruction will be read from offset
.
fn offset(&self) -> usize
Returns the offset, in bytes, at which the next instruction will be read.
fn read_instruction(&mut self) -> Result<Instruction, ExecError>
Reads an Instruction
value from the byte stream.