pub enum Instruction {
Numeric(NumericInstruction),
Reference(ReferenceInstruction),
Parametric(ParametricInstruction),
Variable(VariableInstruction),
Table(TableInstruction),
Memory(MemoryInstruction),
Control(ControlInstruction),
}Expand description
WebAssembly code consists of sequences of instructions. Its computational model is based on a stack machine in that instructions manipulate values on an implicit operand stack, consuming (popping) argument values and producing or returning (pushing) result values. In addition to dynamic operands from the stack, some instructions also have static immediate arguments, typically indices or type annotations, which are part of the instruction itself. Some instructions are structured in that they bracket nested sequences of instructions. The following sections group instructions into a number of different categories.
See https://webassembly.github.io/spec/core/syntax/instructions.html#instructions
§Examples
See the specific instruction types for examples.
Variants§
Numeric(NumericInstruction)
Reference(ReferenceInstruction)
Parametric(ParametricInstruction)
Variable(VariableInstruction)
Table(TableInstruction)
Memory(MemoryInstruction)
Control(ControlInstruction)
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Instruction
impl Debug for Instruction
Source§impl From<ControlInstruction> for Instruction
impl From<ControlInstruction> for Instruction
Source§fn from(instruction: ControlInstruction) -> Self
fn from(instruction: ControlInstruction) -> Self
Converts to this type from the input type.
Source§impl From<MemoryInstruction> for Instruction
impl From<MemoryInstruction> for Instruction
Source§fn from(instruction: MemoryInstruction) -> Self
fn from(instruction: MemoryInstruction) -> Self
Converts to this type from the input type.
Source§impl From<NumericInstruction> for Instruction
impl From<NumericInstruction> for Instruction
Source§fn from(instruction: NumericInstruction) -> Self
fn from(instruction: NumericInstruction) -> Self
Converts to this type from the input type.
Source§impl From<ParametricInstruction> for Instruction
impl From<ParametricInstruction> for Instruction
Source§fn from(instruction: ParametricInstruction) -> Self
fn from(instruction: ParametricInstruction) -> Self
Converts to this type from the input type.
Source§impl From<ReferenceInstruction> for Instruction
impl From<ReferenceInstruction> for Instruction
Source§fn from(instruction: ReferenceInstruction) -> Self
fn from(instruction: ReferenceInstruction) -> Self
Converts to this type from the input type.
Source§impl From<TableInstruction> for Instruction
impl From<TableInstruction> for Instruction
Source§fn from(instruction: TableInstruction) -> Self
fn from(instruction: TableInstruction) -> Self
Converts to this type from the input type.
Source§impl From<VariableInstruction> for Instruction
impl From<VariableInstruction> for Instruction
Source§fn from(instruction: VariableInstruction) -> Self
fn from(instruction: VariableInstruction) -> Self
Converts to this type from the input type.
Source§impl From<f32> for Instruction
impl From<f32> for Instruction
Source§impl From<f64> for Instruction
impl From<f64> for Instruction
Source§impl From<i16> for Instruction
impl From<i16> for Instruction
Source§impl From<i32> for Instruction
impl From<i32> for Instruction
Source§impl From<i64> for Instruction
impl From<i64> for Instruction
Source§impl From<i8> for Instruction
impl From<i8> for Instruction
Source§impl From<u16> for Instruction
impl From<u16> for Instruction
Source§impl From<u32> for Instruction
impl From<u32> for Instruction
Source§impl From<u8> for Instruction
impl From<u8> for Instruction
Source§impl PartialEq for Instruction
impl PartialEq for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more