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: Module<'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,
    },
}
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>)
QuoteModule
Show fields

Fields of QuoteModule

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

Fields of AssertMalformed

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

Fields of AssertInvalid

span: Spanmodule: Module<'a>message: &'a str
Register
Show fields

Fields of Register

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

Fields of AssertTrap

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

Fields of AssertReturn

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

Fields of AssertExhaustion

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

Fields of AssertUnlinkable

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

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.