[−][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<'c>(
&mut self,
resources: &dyn WasmModuleResources
) -> Result<Operator<'c>> where
'b: 'c,
[src]
&mut self,
resources: &dyn WasmModuleResources
) -> Result<Operator<'c>> where
'b: 'c,
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 i = 0; loop { { match *parser.read() { ParserState::Error(_) | ParserState::EndWasm => break, ParserState::BeginFunctionBody {..} => (), _ => continue } } let mut reader = parser.create_validating_operator_parser(); println!("Function {}", i); i += 1; while !reader.eof() { let read = reader.next(parser.get_resources()); 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> Unpin for ValidatingOperatorParser<'b>
impl<'b> Sync for ValidatingOperatorParser<'b>
impl<'b> UnwindSafe for ValidatingOperatorParser<'b>
impl<'b> RefUnwindSafe for ValidatingOperatorParser<'b>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,