pub struct ValidatingOperatorParser<'b> { /* private fields */ }

Implementations

Creates a BinaryReader when current state is ParserState::BeginSection or ParserState::BeginFunctionBody.

Examples
use wasmparser::{WasmDecoder, ParserState, ValidatingParser};
let mut parser = ValidatingParser::new(data, None);
let mut validating_parsers = Vec::new();
loop {
    {
        match *parser.read() {
            ParserState::Error(_) |
            ParserState::EndWasm => break,
            ParserState::BeginFunctionBody {..} => (),
            _ => continue
        }
    }
    let reader = parser.create_validating_operator_parser();
    validating_parsers.push(reader);
}
for (i, reader) in validating_parsers.iter_mut().enumerate() {
    println!("Function {}", i);
    while !reader.eof() {
      let read = reader.next(&parser);
      if let Ok(ref op) = read {
          println!("  {:?}", op);
      } else {
          panic!("  Bad wasm code {:?}", read.err());
      }
    }
}

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.