[][src]Enum walrus::ir::InstrSeqType

pub enum InstrSeqType {
    Simple(Option<ValType>),
    MultiValue(TypeId),
}

The type of an instruction sequence.

Variants

Simple(Option<ValType>)

MVP Wasm blocks/loops/ifs can only push zero or one resulting value onto the stack. They cannot take parameters on the stack.

MultiValue(TypeId)

The multi-value extension to Wasm allows arbitrary stack parameters and results, which are expressed via the same mechanism as function types.

Methods

impl InstrSeqType[src]

pub fn new(
    types: &mut ModuleTypes,
    params: &[ValType],
    results: &[ValType]
) -> InstrSeqType
[src]

Construct a new InstrSeqType of the correct form for the given parameter and result types.

pub fn existing(
    types: &ModuleTypes,
    params: &[ValType],
    results: &[ValType]
) -> Option<InstrSeqType>
[src]

Construct an InstrSeqType with a signature that is known to either be Simple or uses a Type that has already been inserted into the ModuleTypes.

Returns None if this is an instruction sequence signature that requires multi-value and ModuleTypes does not already have a Type for it.

Trait Implementations

impl Eq for InstrSeqType[src]

impl Clone for InstrSeqType[src]

impl PartialEq<InstrSeqType> for InstrSeqType[src]

impl From<Option<ValType>> for InstrSeqType[src]

impl From<ValType> for InstrSeqType[src]

impl From<Id<Type>> for InstrSeqType[src]

impl Copy for InstrSeqType[src]

impl Debug for InstrSeqType[src]

Auto Trait Implementations

impl Sync for InstrSeqType

impl Send for InstrSeqType

impl Unpin for InstrSeqType

impl UnwindSafe for InstrSeqType

impl RefUnwindSafe for InstrSeqType

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]