Skip to main content

WasiInstruction

Enum WasiInstruction 

Source
pub enum WasiInstruction {
Show 63 variants Nop, Unreachable, Block { block_type: Option<WasmValueType>, }, Loop { block_type: Option<WasmValueType>, }, If { block_type: Option<WasmValueType>, }, Else, End, Br { label_index: u32, }, BrIf { label_index: u32, }, Return, Call { function_index: u32, }, Drop, Select, LocalGet { local_index: u32, }, LocalSet { local_index: u32, }, I32Load { offset: u32, align: u32, }, I64Load { offset: u32, align: u32, }, F32Load { offset: u32, align: u32, }, F64Load { offset: u32, align: u32, }, I32Store { offset: u32, align: u32, }, I64Store { offset: u32, align: u32, }, F32Store { offset: u32, align: u32, }, F64Store { offset: u32, align: u32, }, StructNew { type_index: u32, }, StructGet { type_index: u32, field_index: u32, }, StructSet { type_index: u32, field_index: u32, }, I32Const { value: i32, }, I64Const { value: i64, }, F32Const { value: f32, }, F64Const { value: f64, }, I32Add, I32Sub, I32Mul, I32DivS, I32DivU, I32RemS, I32RemU, I32And, I32Or, I32Xor, I32Shl, I32ShrS, I32ShrU, I32Rotl, I32Rotr, I32Eqz, I32Eq, I32Ne, I32LtS, I32LtU, I32GtS, I32GtU, I32LeS, I32LeU, I32GeS, I32GeU, TaskBackpressure, TaskReturn, TaskWait, TaskPoll, TaskYield, ErrorContextNew, ErrorContextDebugMessage,
}
Expand description

WASM 指令

Variants§

§

Nop

无操作

§

Unreachable

不可达

§

Block

块开始

Fields

§block_type: Option<WasmValueType>
§

Loop

循环开始

Fields

§block_type: Option<WasmValueType>
§

If

条件分支

Fields

§block_type: Option<WasmValueType>
§

Else

Else 分支

§

End

块结束

§

Br

分支

Fields

§label_index: u32
§

BrIf

条件分支

Fields

§label_index: u32
§

Return

返回

§

Call

函数调用

Fields

§function_index: u32
§

Drop

丢弃栈顶值

§

Select

选择

§

LocalGet

加载局部变量

Fields

§local_index: u32
§

LocalSet

设置局部变量

Fields

§local_index: u32
§

I32Load

加载内存

Fields

§offset: u32
§align: u32
§

I64Load

Fields

§offset: u32
§align: u32
§

F32Load

Fields

§offset: u32
§align: u32
§

F64Load

Fields

§offset: u32
§align: u32
§

I32Store

存储内存

Fields

§offset: u32
§align: u32
§

I64Store

Fields

§offset: u32
§align: u32
§

F32Store

Fields

§offset: u32
§align: u32
§

F64Store

Fields

§offset: u32
§align: u32
§

StructNew

结构体操作 (GC Proposal)

Fields

§type_index: u32
§

StructGet

Fields

§type_index: u32
§field_index: u32
§

StructSet

Fields

§type_index: u32
§field_index: u32
§

I32Const

加载常量

Fields

§value: i32
§

I64Const

Fields

§value: i64
§

F32Const

Fields

§value: f32
§

F64Const

Fields

§value: f64
§

I32Add

算术运算

§

I32Sub

§

I32Mul

§

I32DivS

§

I32DivU

§

I32RemS

§

I32RemU

§

I32And

§

I32Or

§

I32Xor

§

I32Shl

§

I32ShrS

§

I32ShrU

§

I32Rotl

§

I32Rotr

§

I32Eqz

比较运算

§

I32Eq

§

I32Ne

§

I32LtS

§

I32LtU

§

I32GtS

§

I32GtU

§

I32LeS

§

I32LeU

§

I32GeS

§

I32GeU

§

TaskBackpressure

异步任务指令 (WASIp3)

§

TaskReturn

§

TaskWait

§

TaskPoll

§

TaskYield

§

ErrorContextNew

错误上下文指令 (WASIp3)

§

ErrorContextDebugMessage

Trait Implementations§

Source§

impl Clone for WasiInstruction

Source§

fn clone(&self) -> WasiInstruction

Returns a duplicate 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 WasiInstruction

Source§

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

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

impl Copy for WasiInstruction

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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,

Source§

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

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

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more