pub trait FunctionBinaryReader<'a> {
    fn read_local_count(&mut self) -> WasmResult<u32>;
fn read_local_decl(&mut self) -> WasmResult<(u32, Type)>;
fn read_operator(&mut self) -> WasmResult<Operator<'a>>;
fn current_position(&self) -> usize;
fn original_position(&self) -> usize;
fn bytes_remaining(&self) -> usize;
fn eof(&self) -> bool;
fn range(&self) -> Range; }
Expand description

Trait for iterating over the operators of a Wasm Function

Required methods

Read a count indicating the number of times to call read_local_decl.

Read a (count, value_type) declaration of local variables of the same type.

Reads the next available Operator.

Returns the current position.

Returns the original position (with the offset)

Returns the number of bytes remaining.

Returns whether the readers has reached the end of the file.

Return the range (original offset, original offset + data length)

Implementors