pub trait FunctionBinaryReader<'a> {
    // Required methods
    fn read_local_count(&mut self) -> WasmResult<u32>;
    fn read_local_decl(&mut self) -> WasmResult<(u32, ValType)>;
    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<usize>;
}Expand description
Trait for iterating over the operators of a Wasm Function
Required Methods§
Sourcefn read_local_count(&mut self) -> WasmResult<u32>
 
fn read_local_count(&mut self) -> WasmResult<u32>
Read a count indicating the number of times to call read_local_decl.
Sourcefn read_local_decl(&mut self) -> WasmResult<(u32, ValType)>
 
fn read_local_decl(&mut self) -> WasmResult<(u32, ValType)>
Read a (count, value_type) declaration of local variables of the same type.
Sourcefn read_operator(&mut self) -> WasmResult<Operator<'a>>
 
fn read_operator(&mut self) -> WasmResult<Operator<'a>>
Reads the next available Operator.
Sourcefn current_position(&self) -> usize
 
fn current_position(&self) -> usize
Returns the current position.
Sourcefn original_position(&self) -> usize
 
fn original_position(&self) -> usize
Returns the original position (with the offset)
Sourcefn bytes_remaining(&self) -> usize
 
fn bytes_remaining(&self) -> usize
Returns the number of bytes remaining.