[][src]Struct wabt::script::ScriptParser

pub struct ScriptParser<F32 = f32, F64 = f64> { /* fields omitted */ }

Parser which allows to parse WebAssembly script text format.

Methods

impl<F32: FromBits<u32>, F64: FromBits<u64>> ScriptParser<F32, F64>[src]

pub fn from_source_and_name(
    source: &[u8],
    test_filename: &str
) -> Result<Self, Error>
[src]

Create ScriptParser from the script in specified file.

The source should contain valid wast.

The test_filename must have a .wast extension.

pub fn from_source_and_name_with_features(
    source: &[u8],
    test_filename: &str,
    features: Features
) -> Result<Self, Error>
[src]

Create ScriptParser from the script in specified file, parsing with the given features.

The source should contain valid wast.

The test_filename must have a .wast extension.

pub fn from_str(source: &str) -> Result<Self, Error>[src]

Create ScriptParser from the script source.

pub fn next(&mut self) -> Result<Option<Command<F32, F64>>, Error>[src]

Returns the next Command from the script.

Returns Err if an error occurred while parsing the script, or returns None if the parser reached end of script.

Auto Trait Implementations

impl<F32, F64> Unpin for ScriptParser<F32, F64> where
    F32: Unpin,
    F64: Unpin

impl<F32 = f32, F64 = f64> !Sync for ScriptParser<F32, F64>

impl<F32 = f32, F64 = f64> !Send for ScriptParser<F32, F64>

impl<F32, F64> UnwindSafe for ScriptParser<F32, F64> where
    F32: UnwindSafe,
    F64: UnwindSafe

impl<F32, F64> RefUnwindSafe for ScriptParser<F32, F64> where
    F32: RefUnwindSafe,
    F64: RefUnwindSafe

Blanket Implementations

impl<T> FromBits<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]