Enum wast::AssertExpression[][src]

pub enum AssertExpression<'a> {
    I32(i32),
    I64(i64),
    F32(NanPattern<Float32>),
    F64(NanPattern<Float64>),
    V128(V128Pattern),
    RefNull(Option<HeapType<'a>>),
    RefExtern(u32),
    RefFunc(Option<Index<'a>>),
    LegacyArithmeticNaN,
    LegacyCanonicalNaN,
}
Expand description

An expression that is valid inside an assert_return directive.

As of https://github.com/WebAssembly/spec/pull/1104, spec tests may include assert_return directives that allow NaN patterns ("nan:canonical", "nan:arithmetic"). Parsing an AssertExpression means that:

  • only constant values (e.g. i32.const 4) are used in the assert_return directive
  • the NaN patterns are allowed (they are not allowed in regular Expressions).

Variants

I32(i32)

Tuple Fields of I32

0: i32
I64(i64)

Tuple Fields of I64

0: i64

Tuple Fields of F32

0: NanPattern<Float32>

Tuple Fields of F64

0: NanPattern<Float64>

Tuple Fields of V128

0: V128Pattern
RefNull(Option<HeapType<'a>>)

Tuple Fields of RefNull

0: Option<HeapType<'a>>
RefExtern(u32)

Tuple Fields of RefExtern

0: u32
RefFunc(Option<Index<'a>>)

Tuple Fields of RefFunc

0: Option<Index<'a>>
LegacyArithmeticNaN
LegacyCanonicalNaN

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

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.