pub enum Instruction {
Show 50 variants ArgumentGet { index: u32, }, CallCore { function_index: u32, }, BoolFromI32, S8FromI32, S8FromI64, S16FromI32, S16FromI64, S32FromI32, S32FromI64, S64FromI32, S64FromI64, I32FromBool, I32FromS8, I32FromS16, I32FromS32, I32FromS64, I64FromS8, I64FromS16, I64FromS32, I64FromS64, U8FromI32, U8FromI64, U16FromI32, U16FromI64, U32FromI32, U32FromI64, U64FromI32, U64FromI64, I32FromU8, I32FromU16, I32FromU32, I32FromU64, I64FromU8, I64FromU16, I64FromU32, I64FromU64, StringLiftMemory, StringLowerMemory, ByteArraySize, ByteArrayLiftMemory, ByteArrayLowerMemory, StringSize, ArrayLiftMemory { value_type: IType, }, ArrayLowerMemory { value_type: IType, }, RecordLiftMemory { record_type_id: u32, }, RecordLowerMemory { record_type_id: u32, }, PushI32 { value: i32, }, PushI64 { value: i64, }, Dup, Swap2,
}
Expand description

Represents all the possible WIT instructions.

Variants§

§

ArgumentGet

Fields

§index: u32

The argument index.

The arg.get instruction.

§

CallCore

Fields

§function_index: u32

The function index.

The call-core instruction.

§

BoolFromI32

The bool.from_i32` instruction.

§

S8FromI32

The s8.from_i32 instruction.

§

S8FromI64

The s8.from_i64 instruction.

§

S16FromI32

The s16.from_i32 instruction.

§

S16FromI64

The s16.from_i64 instruction.

§

S32FromI32

The s32.from_i32 instruction.

§

S32FromI64

The s32.from_i64 instruction.

§

S64FromI32

The s64.from_i32 instruction.

§

S64FromI64

The s64.from_i64 instruction.

§

I32FromBool

The i32.from_bool instruction.

§

I32FromS8

The i32.from_s8 instruction.

§

I32FromS16

The i32.from_s16 instruction.

§

I32FromS32

The i32.from_s32 instruction.

§

I32FromS64

The i32.from_s64 instruction.

§

I64FromS8

The i64.from_s8 instruction.

§

I64FromS16

The i64.from_s16 instruction.

§

I64FromS32

The i64.from_s32 instruction.

§

I64FromS64

The i64.from_s64 instruction.

§

U8FromI32

The u8.from_i32 instruction.

§

U8FromI64

The u8.from_i64 instruction.

§

U16FromI32

The u16.from_i32 instruction.

§

U16FromI64

The u16.from_i64 instruction.

§

U32FromI32

The u32.from_i32 instruction.

§

U32FromI64

The u32.from_i64 instruction.

§

U64FromI32

The u64.from_i32 instruction.

§

U64FromI64

The u64.from_i64 instruction.

§

I32FromU8

The i32.from_u8 instruction.

§

I32FromU16

The i32.from_u16 instruction.

§

I32FromU32

The i32.from_u32 instruction.

§

I32FromU64

The i32.from_u64 instruction.

§

I64FromU8

The i64.from_u8 instruction.

§

I64FromU16

The i64.from_u16 instruction.

§

I64FromU32

The i64.from_u32 instruction.

§

I64FromU64

The i64.from_u64 instruction.

§

StringLiftMemory

The string.lift_memory instruction.

§

StringLowerMemory

The string.lower_memory instruction.

§

ByteArraySize

The byte_array.size instruction.

§

ByteArrayLiftMemory

The byte_array.lift_memory instruction.

§

ByteArrayLowerMemory

The byte_array.lower_memory instruction.

§

StringSize

The string.size instruction.

§

ArrayLiftMemory

Fields

§value_type: IType

Array value type.

The array.lift_memory instruction.

§

ArrayLowerMemory

Fields

§value_type: IType

Array value type.

The array.lower_memory instruction.

§

RecordLiftMemory

Fields

§record_type_id: u32

The type index of the record.

The record.lift_memory instruction.

§

RecordLowerMemory

Fields

§record_type_id: u32

The type index of the record.

The record.lower_memory instruction.

§

PushI32

Fields

§value: i32

The value that should be pushed on the stack.

The i32.push instruction.

§

PushI64

Fields

§value: i64

The value that should be pushed on the stack.

The i64.push instruction.

§

Dup

The dup instructions.

§

Swap2

The swap instructions.

Trait Implementations§

source§

impl Clone for Instruction

source§

fn clone(&self) -> Instruction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Instruction

source§

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

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

impl<'de> Deserialize<'de> for Instruction

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for Instruction

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<'a> Parse<'a> for Instruction

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 PartialEq for Instruction

source§

fn eq(&self, other: &Instruction) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Instruction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<W> ToBytes<W> for Instruction
where W: Write,

Encode an Instruction into bytes.

Decoder is decoders::binary::instruction.

source§

fn to_bytes(&self, writer: &mut W) -> Result<()>

Converts the given value into &[u8] in the given writer.
source§

impl ToString for &Instruction

Encode an Instruction into a string.

source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl Eq for Instruction

source§

impl StructuralEq for Instruction

source§

impl StructuralPartialEq for Instruction

Auto Trait Implementations§

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,