[−][src]Struct wasmparser::ValidatingOperatorParser
Methods
impl<'b> ValidatingOperatorParser<'b>
[src]
pub fn eof(&self) -> bool
[src]
pub fn current_position(&self) -> usize
[src]
pub fn is_dead_code(&self) -> bool
[src]
pub fn next(
&mut self,
resources: &dyn WasmModuleResources
) -> Result<Operator<'b>>
[src]
&mut self,
resources: &dyn WasmModuleResources
) -> Result<Operator<'b>>
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
impl<'b> Send for ValidatingOperatorParser<'b>
impl<'b> Sync for ValidatingOperatorParser<'b>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,