Enum wast::WastDirective[][src]

pub enum WastDirective<'a> {
    Module(Module<'a>),
    QuoteModule {
        span: Span,
        source: Vec<&'a [u8]>,
    },
    AssertMalformed {
        span: Span,
        module: QuoteModule<'a>,
        message: &'a str,
    },
    AssertInvalid {
        span: Span,
        module: QuoteModule<'a>,
        message: &'a str,
    },
    Register {
        span: Span,
        name: &'a str,
        module: Option<Id<'a>>,
    },
    Invoke(WastInvoke<'a>),
    AssertTrap {
        span: Span,
        exec: WastExecute<'a>,
        message: &'a str,
    },
    AssertReturn {
        span: Span,
        exec: WastExecute<'a>,
        results: Vec<AssertExpression<'a>>,
    },
    AssertExhaustion {
        span: Span,
        call: WastInvoke<'a>,
        message: &'a str,
    },
    AssertUnlinkable {
        span: Span,
        module: Module<'a>,
        message: &'a str,
    },
    AssertException {
        span: Span,
        exec: WastExecute<'a>,
    },
}
Expand description

The different kinds of directives found in a *.wast file.

It’s not entirely clear to me what all of these are per se, but they’re only really interesting to test harnesses mostly.

Variants

Module(Module<'a>)

Tuple Fields of Module

0: Module<'a>
QuoteModule

Fields of QuoteModule

span: Spansource: Vec<&'a [u8]>
AssertMalformed

Fields of AssertMalformed

span: Spanmodule: QuoteModule<'a>message: &'a str
AssertInvalid

Fields of AssertInvalid

span: Spanmodule: QuoteModule<'a>message: &'a str
Register

Fields of Register

span: Spanname: &'a strmodule: Option<Id<'a>>
Invoke(WastInvoke<'a>)

Tuple Fields of Invoke

0: WastInvoke<'a>
AssertTrap

Fields of AssertTrap

span: Spanexec: WastExecute<'a>message: &'a str
AssertReturn

Fields of AssertReturn

span: Spanexec: WastExecute<'a>results: Vec<AssertExpression<'a>>
AssertExhaustion

Fields of AssertExhaustion

span: Spancall: WastInvoke<'a>message: &'a str
AssertUnlinkable

Fields of AssertUnlinkable

span: Spanmodule: Module<'a>message: &'a str
AssertException

Fields of AssertException

span: Spanexec: WastExecute<'a>

Implementations

Returns the location in the source that this directive was defined at

Trait Implementations

Attempts to parse Self from parser, returning an error if it could not be parsed. Read more

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

Performs the conversion.

Performs the conversion.

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.