Enum wast::WastDirective

source ·
pub enum WastDirective<'a> {
    Wat(QuoteWat<'a>),
    AssertMalformed {
        span: Span,
        module: QuoteWat<'a>,
        message: &'a str,
    },
    AssertInvalid {
        span: Span,
        module: QuoteWat<'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<WastRet<'a>>,
    },
    AssertExhaustion {
        span: Span,
        call: WastInvoke<'a>,
        message: &'a str,
    },
    AssertUnlinkable {
        span: Span,
        module: Wat<'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§

§

Wat(QuoteWat<'a>)

§

AssertMalformed

Fields

§span: Span
§module: QuoteWat<'a>
§message: &'a str
§

AssertInvalid

Fields

§span: Span
§module: QuoteWat<'a>
§message: &'a str
§

Register

Fields

§span: Span
§name: &'a str
§module: Option<Id<'a>>
§

Invoke(WastInvoke<'a>)

§

AssertTrap

Fields

§span: Span
§exec: WastExecute<'a>
§message: &'a str
§

AssertReturn

Fields

§span: Span
§exec: WastExecute<'a>
§results: Vec<WastRet<'a>>
§

AssertExhaustion

Fields

§span: Span
§call: WastInvoke<'a>
§message: &'a str
§

AssertUnlinkable

Fields

§span: Span
§module: Wat<'a>
§message: &'a str
§

AssertException

Fields

§span: Span
§exec: WastExecute<'a>

Implementations§

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

Trait Implementations§

Formats the value using the given formatter. Read more
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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.