WastRetCore

Enum WastRetCore 

Source
pub enum WastRetCore<'a> {
Show 16 variants I32(i32), I64(i64), F32(NanPattern<F32>), F64(NanPattern<F64>), V128(V128Pattern), RefNull(Option<HeapType<'a>>), RefExtern(Option<u32>), RefHost(u32), RefFunc(Option<Index<'a>>), RefAny, RefEq, RefArray, RefStruct, RefI31, RefI31Shared, Either(Vec<WastRetCore<'a>>),
}
Expand description

Expressions that can be used inside of assert_return to validate the return value of a core wasm function.

Variants§

§

I32(i32)

§

I64(i64)

§

F32(NanPattern<F32>)

§

F64(NanPattern<F64>)

§

V128(V128Pattern)

§

RefNull(Option<HeapType<'a>>)

A null reference is expected, optionally with a specified type.

§

RefExtern(Option<u32>)

A non-null externref is expected which should contain the specified value.

§

RefHost(u32)

A non-null anyref is expected which should contain the specified host value.

§

RefFunc(Option<Index<'a>>)

A non-null funcref is expected.

§

RefAny

A non-null anyref is expected.

§

RefEq

A non-null eqref is expected.

§

RefArray

A non-null arrayref is expected.

§

RefStruct

A non-null structref is expected.

§

RefI31

A non-null i31ref is expected.

§

RefI31Shared

A non-null, shared i31ref is expected.

§

Either(Vec<WastRetCore<'a>>)

Trait Implementations§

Source§

impl<'a> Debug for WastRetCore<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Parse<'a> for WastRetCore<'a>

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

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

impl Peek for WastRetCore<'_>

Source§

fn peek(cursor: Cursor<'_>) -> Result<bool>

Tests to see whether this token is the first token within the Cursor specified. Read more
Source§

fn display() -> &'static str

Returns a human-readable name of this token to display when generating errors about this token missing.
Source§

fn peek2(cursor: Cursor<'_>) -> Result<bool>

The same as peek, except it checks the token immediately following the current token.

Auto Trait Implementations§

§

impl<'a> Freeze for WastRetCore<'a>

§

impl<'a> RefUnwindSafe for WastRetCore<'a>

§

impl<'a> Send for WastRetCore<'a>

§

impl<'a> Sync for WastRetCore<'a>

§

impl<'a> Unpin for WastRetCore<'a>

§

impl<'a> UnwindSafe for WastRetCore<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.