[−][src]Enum walrus::ir::Instr
An enum of all the different kinds of wasm instructions.
Note that the #[walrus_expr]
macro rewrites this enum's variants from
enum Instr { Variant { field: Ty, .. }, ... }
into
enum Instr { Variant(Variant), ... } struct Variant { field: Ty, ... }
Variants
Block(Block)
block ... end
Loop(Loop)
loop ... end
Call(Call)
call
CallIndirect(CallIndirect)
call_indirect
LocalGet(LocalGet)
local.get n
LocalSet(LocalSet)
local.set n
LocalTee(LocalTee)
local.tee n
GlobalGet(GlobalGet)
global.get n
GlobalSet(GlobalSet)
global.set n
Const(Const)
*.const
Binop(Binop)
Binary operations, those requiring two operands
Unop(Unop)
Unary operations, those requiring one operand
Select(Select)
select
Unreachable(Unreachable)
unreachable
Br(Br)
br
BrIf(BrIf)
br_if
IfElse(IfElse)
if <consequent> else <alternative> end
BrTable(BrTable)
br_table
Drop(Drop)
drop
Return(Return)
return
MemorySize(MemorySize)
memory.size
MemoryGrow(MemoryGrow)
memory.grow
MemoryInit(MemoryInit)
memory.init
DataDrop(DataDrop)
data.drop
MemoryCopy(MemoryCopy)
memory.copy
MemoryFill(MemoryFill)
memory.fill
Load(Load)
*.load
Loading a value from memory.
Store(Store)
*.store
Storing a value to memory.
AtomicRmw(AtomicRmw)
An atomic read/modify/write operation.
Cmpxchg(Cmpxchg)
An atomic compare-and-exchange operation.
AtomicNotify(AtomicNotify)
The atomic.notify
instruction to wake up threads.
AtomicWait(AtomicWait)
The *.atomic.wait
instruction to block threads.
AtomicFence(AtomicFence)
The atomic.fence
instruction
TableGet(TableGet)
table.get
TableSet(TableSet)
table.set
TableGrow(TableGrow)
table.grow
TableSize(TableSize)
table.size
TableFill(TableFill)
table.fill
RefNull(RefNull)
ref.null $ty
RefIsNull(RefIsNull)
ref.is_null
RefFunc(RefFunc)
ref.func
V128Bitselect(V128Bitselect)
v128.bitselect
V128Swizzle(V128Swizzle)
v128.swizzle
V128Shuffle(V128Shuffle)
v128.shuffle
LoadSimd(LoadSimd)
Various instructions to load a simd vector from memory
TableInit(TableInit)
table.init
ElemDrop(ElemDrop)
elem.drop
TableCopy(TableCopy)
table.copy
Implementations
impl Instr
[src]
pub fn block_mut(&mut self) -> Option<&mut Block>
[src]
If this instruction is a Block
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_block(&self) -> bool
[src]
Is this instruction a Block
?
pub fn unwrap_block(&self) -> &Block
[src]
Get a shared reference to the underlying Block
.
Panics if this instruction is not a Block
.
pub fn unwrap_block_mut(&mut self) -> &mut Block
[src]
Get an exclusive reference to the underlying Block
.
Panics if this instruction is not a Block
.
pub fn loop_mut(&mut self) -> Option<&mut Loop>
[src]
If this instruction is a Loop
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_loop(&self) -> bool
[src]
Is this instruction a Loop
?
pub fn unwrap_loop(&self) -> &Loop
[src]
Get a shared reference to the underlying Loop
.
Panics if this instruction is not a Loop
.
pub fn unwrap_loop_mut(&mut self) -> &mut Loop
[src]
Get an exclusive reference to the underlying Loop
.
Panics if this instruction is not a Loop
.
pub fn call_mut(&mut self) -> Option<&mut Call>
[src]
If this instruction is a Call
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_call(&self) -> bool
[src]
Is this instruction a Call
?
pub fn unwrap_call(&self) -> &Call
[src]
Get a shared reference to the underlying Call
.
Panics if this instruction is not a Call
.
pub fn unwrap_call_mut(&mut self) -> &mut Call
[src]
Get an exclusive reference to the underlying Call
.
Panics if this instruction is not a Call
.
pub fn call_indirect_mut(&mut self) -> Option<&mut CallIndirect>
[src]
If this instruction is a CallIndirect
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_call_indirect(&self) -> bool
[src]
Is this instruction a CallIndirect
?
pub fn unwrap_call_indirect(&self) -> &CallIndirect
[src]
Get a shared reference to the underlying CallIndirect
.
Panics if this instruction is not a CallIndirect
.
pub fn unwrap_call_indirect_mut(&mut self) -> &mut CallIndirect
[src]
Get an exclusive reference to the underlying CallIndirect
.
Panics if this instruction is not a CallIndirect
.
pub fn local_get_mut(&mut self) -> Option<&mut LocalGet>
[src]
If this instruction is a LocalGet
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_local_get(&self) -> bool
[src]
Is this instruction a LocalGet
?
pub fn unwrap_local_get(&self) -> &LocalGet
[src]
Get a shared reference to the underlying LocalGet
.
Panics if this instruction is not a LocalGet
.
pub fn unwrap_local_get_mut(&mut self) -> &mut LocalGet
[src]
Get an exclusive reference to the underlying LocalGet
.
Panics if this instruction is not a LocalGet
.
pub fn local_set_mut(&mut self) -> Option<&mut LocalSet>
[src]
If this instruction is a LocalSet
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_local_set(&self) -> bool
[src]
Is this instruction a LocalSet
?
pub fn unwrap_local_set(&self) -> &LocalSet
[src]
Get a shared reference to the underlying LocalSet
.
Panics if this instruction is not a LocalSet
.
pub fn unwrap_local_set_mut(&mut self) -> &mut LocalSet
[src]
Get an exclusive reference to the underlying LocalSet
.
Panics if this instruction is not a LocalSet
.
pub fn local_tee_mut(&mut self) -> Option<&mut LocalTee>
[src]
If this instruction is a LocalTee
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_local_tee(&self) -> bool
[src]
Is this instruction a LocalTee
?
pub fn unwrap_local_tee(&self) -> &LocalTee
[src]
Get a shared reference to the underlying LocalTee
.
Panics if this instruction is not a LocalTee
.
pub fn unwrap_local_tee_mut(&mut self) -> &mut LocalTee
[src]
Get an exclusive reference to the underlying LocalTee
.
Panics if this instruction is not a LocalTee
.
pub fn global_get_mut(&mut self) -> Option<&mut GlobalGet>
[src]
If this instruction is a GlobalGet
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_global_get(&self) -> bool
[src]
Is this instruction a GlobalGet
?
pub fn unwrap_global_get(&self) -> &GlobalGet
[src]
Get a shared reference to the underlying GlobalGet
.
Panics if this instruction is not a GlobalGet
.
pub fn unwrap_global_get_mut(&mut self) -> &mut GlobalGet
[src]
Get an exclusive reference to the underlying GlobalGet
.
Panics if this instruction is not a GlobalGet
.
pub fn global_set_mut(&mut self) -> Option<&mut GlobalSet>
[src]
If this instruction is a GlobalSet
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_global_set(&self) -> bool
[src]
Is this instruction a GlobalSet
?
pub fn unwrap_global_set(&self) -> &GlobalSet
[src]
Get a shared reference to the underlying GlobalSet
.
Panics if this instruction is not a GlobalSet
.
pub fn unwrap_global_set_mut(&mut self) -> &mut GlobalSet
[src]
Get an exclusive reference to the underlying GlobalSet
.
Panics if this instruction is not a GlobalSet
.
pub fn const_mut(&mut self) -> Option<&mut Const>
[src]
If this instruction is a Const
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_const(&self) -> bool
[src]
Is this instruction a Const
?
pub fn unwrap_const(&self) -> &Const
[src]
Get a shared reference to the underlying Const
.
Panics if this instruction is not a Const
.
pub fn unwrap_const_mut(&mut self) -> &mut Const
[src]
Get an exclusive reference to the underlying Const
.
Panics if this instruction is not a Const
.
pub fn binop_mut(&mut self) -> Option<&mut Binop>
[src]
If this instruction is a Binop
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_binop(&self) -> bool
[src]
Is this instruction a Binop
?
pub fn unwrap_binop(&self) -> &Binop
[src]
Get a shared reference to the underlying Binop
.
Panics if this instruction is not a Binop
.
pub fn unwrap_binop_mut(&mut self) -> &mut Binop
[src]
Get an exclusive reference to the underlying Binop
.
Panics if this instruction is not a Binop
.
pub fn unop_mut(&mut self) -> Option<&mut Unop>
[src]
If this instruction is a Unop
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_unop(&self) -> bool
[src]
Is this instruction a Unop
?
pub fn unwrap_unop(&self) -> &Unop
[src]
Get a shared reference to the underlying Unop
.
Panics if this instruction is not a Unop
.
pub fn unwrap_unop_mut(&mut self) -> &mut Unop
[src]
Get an exclusive reference to the underlying Unop
.
Panics if this instruction is not a Unop
.
pub fn select_mut(&mut self) -> Option<&mut Select>
[src]
If this instruction is a Select
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_select(&self) -> bool
[src]
Is this instruction a Select
?
pub fn unwrap_select(&self) -> &Select
[src]
Get a shared reference to the underlying Select
.
Panics if this instruction is not a Select
.
pub fn unwrap_select_mut(&mut self) -> &mut Select
[src]
Get an exclusive reference to the underlying Select
.
Panics if this instruction is not a Select
.
pub fn unreachable_mut(&mut self) -> Option<&mut Unreachable>
[src]
If this instruction is a Unreachable
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_unreachable(&self) -> bool
[src]
Is this instruction a Unreachable
?
pub fn unwrap_unreachable(&self) -> &Unreachable
[src]
Get a shared reference to the underlying Unreachable
.
Panics if this instruction is not a Unreachable
.
pub fn unwrap_unreachable_mut(&mut self) -> &mut Unreachable
[src]
Get an exclusive reference to the underlying Unreachable
.
Panics if this instruction is not a Unreachable
.
pub fn br_mut(&mut self) -> Option<&mut Br>
[src]
If this instruction is a Br
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_br(&self) -> bool
[src]
Is this instruction a Br
?
pub fn unwrap_br(&self) -> &Br
[src]
Get a shared reference to the underlying Br
.
Panics if this instruction is not a Br
.
pub fn unwrap_br_mut(&mut self) -> &mut Br
[src]
Get an exclusive reference to the underlying Br
.
Panics if this instruction is not a Br
.
pub fn br_if_mut(&mut self) -> Option<&mut BrIf>
[src]
If this instruction is a BrIf
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_br_if(&self) -> bool
[src]
Is this instruction a BrIf
?
pub fn unwrap_br_if(&self) -> &BrIf
[src]
Get a shared reference to the underlying BrIf
.
Panics if this instruction is not a BrIf
.
pub fn unwrap_br_if_mut(&mut self) -> &mut BrIf
[src]
Get an exclusive reference to the underlying BrIf
.
Panics if this instruction is not a BrIf
.
pub fn if_else_mut(&mut self) -> Option<&mut IfElse>
[src]
If this instruction is a IfElse
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_if_else(&self) -> bool
[src]
Is this instruction a IfElse
?
pub fn unwrap_if_else(&self) -> &IfElse
[src]
Get a shared reference to the underlying IfElse
.
Panics if this instruction is not a IfElse
.
pub fn unwrap_if_else_mut(&mut self) -> &mut IfElse
[src]
Get an exclusive reference to the underlying IfElse
.
Panics if this instruction is not a IfElse
.
pub fn br_table_mut(&mut self) -> Option<&mut BrTable>
[src]
If this instruction is a BrTable
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_br_table(&self) -> bool
[src]
Is this instruction a BrTable
?
pub fn unwrap_br_table(&self) -> &BrTable
[src]
Get a shared reference to the underlying BrTable
.
Panics if this instruction is not a BrTable
.
pub fn unwrap_br_table_mut(&mut self) -> &mut BrTable
[src]
Get an exclusive reference to the underlying BrTable
.
Panics if this instruction is not a BrTable
.
pub fn drop_mut(&mut self) -> Option<&mut Drop>
[src]
If this instruction is a Drop
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_drop(&self) -> bool
[src]
Is this instruction a Drop
?
pub fn unwrap_drop(&self) -> &Drop
[src]
Get a shared reference to the underlying Drop
.
Panics if this instruction is not a Drop
.
pub fn unwrap_drop_mut(&mut self) -> &mut Drop
[src]
Get an exclusive reference to the underlying Drop
.
Panics if this instruction is not a Drop
.
pub fn return_mut(&mut self) -> Option<&mut Return>
[src]
If this instruction is a Return
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_return(&self) -> bool
[src]
Is this instruction a Return
?
pub fn unwrap_return(&self) -> &Return
[src]
Get a shared reference to the underlying Return
.
Panics if this instruction is not a Return
.
pub fn unwrap_return_mut(&mut self) -> &mut Return
[src]
Get an exclusive reference to the underlying Return
.
Panics if this instruction is not a Return
.
pub fn memory_size_mut(&mut self) -> Option<&mut MemorySize>
[src]
If this instruction is a MemorySize
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_memory_size(&self) -> bool
[src]
Is this instruction a MemorySize
?
pub fn unwrap_memory_size(&self) -> &MemorySize
[src]
Get a shared reference to the underlying MemorySize
.
Panics if this instruction is not a MemorySize
.
pub fn unwrap_memory_size_mut(&mut self) -> &mut MemorySize
[src]
Get an exclusive reference to the underlying MemorySize
.
Panics if this instruction is not a MemorySize
.
pub fn memory_grow_mut(&mut self) -> Option<&mut MemoryGrow>
[src]
If this instruction is a MemoryGrow
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_memory_grow(&self) -> bool
[src]
Is this instruction a MemoryGrow
?
pub fn unwrap_memory_grow(&self) -> &MemoryGrow
[src]
Get a shared reference to the underlying MemoryGrow
.
Panics if this instruction is not a MemoryGrow
.
pub fn unwrap_memory_grow_mut(&mut self) -> &mut MemoryGrow
[src]
Get an exclusive reference to the underlying MemoryGrow
.
Panics if this instruction is not a MemoryGrow
.
pub fn memory_init_mut(&mut self) -> Option<&mut MemoryInit>
[src]
If this instruction is a MemoryInit
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_memory_init(&self) -> bool
[src]
Is this instruction a MemoryInit
?
pub fn unwrap_memory_init(&self) -> &MemoryInit
[src]
Get a shared reference to the underlying MemoryInit
.
Panics if this instruction is not a MemoryInit
.
pub fn unwrap_memory_init_mut(&mut self) -> &mut MemoryInit
[src]
Get an exclusive reference to the underlying MemoryInit
.
Panics if this instruction is not a MemoryInit
.
pub fn data_drop_mut(&mut self) -> Option<&mut DataDrop>
[src]
If this instruction is a DataDrop
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_data_drop(&self) -> bool
[src]
Is this instruction a DataDrop
?
pub fn unwrap_data_drop(&self) -> &DataDrop
[src]
Get a shared reference to the underlying DataDrop
.
Panics if this instruction is not a DataDrop
.
pub fn unwrap_data_drop_mut(&mut self) -> &mut DataDrop
[src]
Get an exclusive reference to the underlying DataDrop
.
Panics if this instruction is not a DataDrop
.
pub fn memory_copy_mut(&mut self) -> Option<&mut MemoryCopy>
[src]
If this instruction is a MemoryCopy
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_memory_copy(&self) -> bool
[src]
Is this instruction a MemoryCopy
?
pub fn unwrap_memory_copy(&self) -> &MemoryCopy
[src]
Get a shared reference to the underlying MemoryCopy
.
Panics if this instruction is not a MemoryCopy
.
pub fn unwrap_memory_copy_mut(&mut self) -> &mut MemoryCopy
[src]
Get an exclusive reference to the underlying MemoryCopy
.
Panics if this instruction is not a MemoryCopy
.
pub fn memory_fill_mut(&mut self) -> Option<&mut MemoryFill>
[src]
If this instruction is a MemoryFill
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_memory_fill(&self) -> bool
[src]
Is this instruction a MemoryFill
?
pub fn unwrap_memory_fill(&self) -> &MemoryFill
[src]
Get a shared reference to the underlying MemoryFill
.
Panics if this instruction is not a MemoryFill
.
pub fn unwrap_memory_fill_mut(&mut self) -> &mut MemoryFill
[src]
Get an exclusive reference to the underlying MemoryFill
.
Panics if this instruction is not a MemoryFill
.
pub fn load_mut(&mut self) -> Option<&mut Load>
[src]
If this instruction is a Load
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_load(&self) -> bool
[src]
Is this instruction a Load
?
pub fn unwrap_load(&self) -> &Load
[src]
Get a shared reference to the underlying Load
.
Panics if this instruction is not a Load
.
pub fn unwrap_load_mut(&mut self) -> &mut Load
[src]
Get an exclusive reference to the underlying Load
.
Panics if this instruction is not a Load
.
pub fn store_mut(&mut self) -> Option<&mut Store>
[src]
If this instruction is a Store
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_store(&self) -> bool
[src]
Is this instruction a Store
?
pub fn unwrap_store(&self) -> &Store
[src]
Get a shared reference to the underlying Store
.
Panics if this instruction is not a Store
.
pub fn unwrap_store_mut(&mut self) -> &mut Store
[src]
Get an exclusive reference to the underlying Store
.
Panics if this instruction is not a Store
.
pub fn atomic_rmw_mut(&mut self) -> Option<&mut AtomicRmw>
[src]
If this instruction is a AtomicRmw
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_atomic_rmw(&self) -> bool
[src]
Is this instruction a AtomicRmw
?
pub fn unwrap_atomic_rmw(&self) -> &AtomicRmw
[src]
Get a shared reference to the underlying AtomicRmw
.
Panics if this instruction is not a AtomicRmw
.
pub fn unwrap_atomic_rmw_mut(&mut self) -> &mut AtomicRmw
[src]
Get an exclusive reference to the underlying AtomicRmw
.
Panics if this instruction is not a AtomicRmw
.
pub fn cmpxchg_mut(&mut self) -> Option<&mut Cmpxchg>
[src]
If this instruction is a Cmpxchg
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_cmpxchg(&self) -> bool
[src]
Is this instruction a Cmpxchg
?
pub fn unwrap_cmpxchg(&self) -> &Cmpxchg
[src]
Get a shared reference to the underlying Cmpxchg
.
Panics if this instruction is not a Cmpxchg
.
pub fn unwrap_cmpxchg_mut(&mut self) -> &mut Cmpxchg
[src]
Get an exclusive reference to the underlying Cmpxchg
.
Panics if this instruction is not a Cmpxchg
.
pub fn atomic_notify_mut(&mut self) -> Option<&mut AtomicNotify>
[src]
If this instruction is a AtomicNotify
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_atomic_notify(&self) -> bool
[src]
Is this instruction a AtomicNotify
?
pub fn unwrap_atomic_notify(&self) -> &AtomicNotify
[src]
Get a shared reference to the underlying AtomicNotify
.
Panics if this instruction is not a AtomicNotify
.
pub fn unwrap_atomic_notify_mut(&mut self) -> &mut AtomicNotify
[src]
Get an exclusive reference to the underlying AtomicNotify
.
Panics if this instruction is not a AtomicNotify
.
pub fn atomic_wait_mut(&mut self) -> Option<&mut AtomicWait>
[src]
If this instruction is a AtomicWait
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_atomic_wait(&self) -> bool
[src]
Is this instruction a AtomicWait
?
pub fn unwrap_atomic_wait(&self) -> &AtomicWait
[src]
Get a shared reference to the underlying AtomicWait
.
Panics if this instruction is not a AtomicWait
.
pub fn unwrap_atomic_wait_mut(&mut self) -> &mut AtomicWait
[src]
Get an exclusive reference to the underlying AtomicWait
.
Panics if this instruction is not a AtomicWait
.
pub fn atomic_fence_mut(&mut self) -> Option<&mut AtomicFence>
[src]
If this instruction is a AtomicFence
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_atomic_fence(&self) -> bool
[src]
Is this instruction a AtomicFence
?
pub fn unwrap_atomic_fence(&self) -> &AtomicFence
[src]
Get a shared reference to the underlying AtomicFence
.
Panics if this instruction is not a AtomicFence
.
pub fn unwrap_atomic_fence_mut(&mut self) -> &mut AtomicFence
[src]
Get an exclusive reference to the underlying AtomicFence
.
Panics if this instruction is not a AtomicFence
.
pub fn table_get_mut(&mut self) -> Option<&mut TableGet>
[src]
If this instruction is a TableGet
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_table_get(&self) -> bool
[src]
Is this instruction a TableGet
?
pub fn unwrap_table_get(&self) -> &TableGet
[src]
Get a shared reference to the underlying TableGet
.
Panics if this instruction is not a TableGet
.
pub fn unwrap_table_get_mut(&mut self) -> &mut TableGet
[src]
Get an exclusive reference to the underlying TableGet
.
Panics if this instruction is not a TableGet
.
pub fn table_set_mut(&mut self) -> Option<&mut TableSet>
[src]
If this instruction is a TableSet
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_table_set(&self) -> bool
[src]
Is this instruction a TableSet
?
pub fn unwrap_table_set(&self) -> &TableSet
[src]
Get a shared reference to the underlying TableSet
.
Panics if this instruction is not a TableSet
.
pub fn unwrap_table_set_mut(&mut self) -> &mut TableSet
[src]
Get an exclusive reference to the underlying TableSet
.
Panics if this instruction is not a TableSet
.
pub fn table_grow_mut(&mut self) -> Option<&mut TableGrow>
[src]
If this instruction is a TableGrow
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_table_grow(&self) -> bool
[src]
Is this instruction a TableGrow
?
pub fn unwrap_table_grow(&self) -> &TableGrow
[src]
Get a shared reference to the underlying TableGrow
.
Panics if this instruction is not a TableGrow
.
pub fn unwrap_table_grow_mut(&mut self) -> &mut TableGrow
[src]
Get an exclusive reference to the underlying TableGrow
.
Panics if this instruction is not a TableGrow
.
pub fn table_size_mut(&mut self) -> Option<&mut TableSize>
[src]
If this instruction is a TableSize
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_table_size(&self) -> bool
[src]
Is this instruction a TableSize
?
pub fn unwrap_table_size(&self) -> &TableSize
[src]
Get a shared reference to the underlying TableSize
.
Panics if this instruction is not a TableSize
.
pub fn unwrap_table_size_mut(&mut self) -> &mut TableSize
[src]
Get an exclusive reference to the underlying TableSize
.
Panics if this instruction is not a TableSize
.
pub fn table_fill_mut(&mut self) -> Option<&mut TableFill>
[src]
If this instruction is a TableFill
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_table_fill(&self) -> bool
[src]
Is this instruction a TableFill
?
pub fn unwrap_table_fill(&self) -> &TableFill
[src]
Get a shared reference to the underlying TableFill
.
Panics if this instruction is not a TableFill
.
pub fn unwrap_table_fill_mut(&mut self) -> &mut TableFill
[src]
Get an exclusive reference to the underlying TableFill
.
Panics if this instruction is not a TableFill
.
pub fn ref_null_mut(&mut self) -> Option<&mut RefNull>
[src]
If this instruction is a RefNull
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_ref_null(&self) -> bool
[src]
Is this instruction a RefNull
?
pub fn unwrap_ref_null(&self) -> &RefNull
[src]
Get a shared reference to the underlying RefNull
.
Panics if this instruction is not a RefNull
.
pub fn unwrap_ref_null_mut(&mut self) -> &mut RefNull
[src]
Get an exclusive reference to the underlying RefNull
.
Panics if this instruction is not a RefNull
.
pub fn ref_is_null_mut(&mut self) -> Option<&mut RefIsNull>
[src]
If this instruction is a RefIsNull
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_ref_is_null(&self) -> bool
[src]
Is this instruction a RefIsNull
?
pub fn unwrap_ref_is_null(&self) -> &RefIsNull
[src]
Get a shared reference to the underlying RefIsNull
.
Panics if this instruction is not a RefIsNull
.
pub fn unwrap_ref_is_null_mut(&mut self) -> &mut RefIsNull
[src]
Get an exclusive reference to the underlying RefIsNull
.
Panics if this instruction is not a RefIsNull
.
pub fn ref_func_mut(&mut self) -> Option<&mut RefFunc>
[src]
If this instruction is a RefFunc
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_ref_func(&self) -> bool
[src]
Is this instruction a RefFunc
?
pub fn unwrap_ref_func(&self) -> &RefFunc
[src]
Get a shared reference to the underlying RefFunc
.
Panics if this instruction is not a RefFunc
.
pub fn unwrap_ref_func_mut(&mut self) -> &mut RefFunc
[src]
Get an exclusive reference to the underlying RefFunc
.
Panics if this instruction is not a RefFunc
.
pub fn v128_bitselect_mut(&mut self) -> Option<&mut V128Bitselect>
[src]
If this instruction is a V128Bitselect
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_v128_bitselect(&self) -> bool
[src]
Is this instruction a V128Bitselect
?
pub fn unwrap_v128_bitselect(&self) -> &V128Bitselect
[src]
Get a shared reference to the underlying V128Bitselect
.
Panics if this instruction is not a V128Bitselect
.
pub fn unwrap_v128_bitselect_mut(&mut self) -> &mut V128Bitselect
[src]
Get an exclusive reference to the underlying V128Bitselect
.
Panics if this instruction is not a V128Bitselect
.
pub fn v128_swizzle_mut(&mut self) -> Option<&mut V128Swizzle>
[src]
If this instruction is a V128Swizzle
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_v128_swizzle(&self) -> bool
[src]
Is this instruction a V128Swizzle
?
pub fn unwrap_v128_swizzle(&self) -> &V128Swizzle
[src]
Get a shared reference to the underlying V128Swizzle
.
Panics if this instruction is not a V128Swizzle
.
pub fn unwrap_v128_swizzle_mut(&mut self) -> &mut V128Swizzle
[src]
Get an exclusive reference to the underlying V128Swizzle
.
Panics if this instruction is not a V128Swizzle
.
pub fn v128_shuffle_mut(&mut self) -> Option<&mut V128Shuffle>
[src]
If this instruction is a V128Shuffle
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_v128_shuffle(&self) -> bool
[src]
Is this instruction a V128Shuffle
?
pub fn unwrap_v128_shuffle(&self) -> &V128Shuffle
[src]
Get a shared reference to the underlying V128Shuffle
.
Panics if this instruction is not a V128Shuffle
.
pub fn unwrap_v128_shuffle_mut(&mut self) -> &mut V128Shuffle
[src]
Get an exclusive reference to the underlying V128Shuffle
.
Panics if this instruction is not a V128Shuffle
.
pub fn load_simd_mut(&mut self) -> Option<&mut LoadSimd>
[src]
If this instruction is a LoadSimd
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_load_simd(&self) -> bool
[src]
Is this instruction a LoadSimd
?
pub fn unwrap_load_simd(&self) -> &LoadSimd
[src]
Get a shared reference to the underlying LoadSimd
.
Panics if this instruction is not a LoadSimd
.
pub fn unwrap_load_simd_mut(&mut self) -> &mut LoadSimd
[src]
Get an exclusive reference to the underlying LoadSimd
.
Panics if this instruction is not a LoadSimd
.
pub fn table_init_mut(&mut self) -> Option<&mut TableInit>
[src]
If this instruction is a TableInit
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_table_init(&self) -> bool
[src]
Is this instruction a TableInit
?
pub fn unwrap_table_init(&self) -> &TableInit
[src]
Get a shared reference to the underlying TableInit
.
Panics if this instruction is not a TableInit
.
pub fn unwrap_table_init_mut(&mut self) -> &mut TableInit
[src]
Get an exclusive reference to the underlying TableInit
.
Panics if this instruction is not a TableInit
.
pub fn elem_drop_mut(&mut self) -> Option<&mut ElemDrop>
[src]
If this instruction is a ElemDrop
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_elem_drop(&self) -> bool
[src]
Is this instruction a ElemDrop
?
pub fn unwrap_elem_drop(&self) -> &ElemDrop
[src]
Get a shared reference to the underlying ElemDrop
.
Panics if this instruction is not a ElemDrop
.
pub fn unwrap_elem_drop_mut(&mut self) -> &mut ElemDrop
[src]
Get an exclusive reference to the underlying ElemDrop
.
Panics if this instruction is not a ElemDrop
.
pub fn table_copy_mut(&mut self) -> Option<&mut TableCopy>
[src]
If this instruction is a TableCopy
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_table_copy(&self) -> bool
[src]
Is this instruction a TableCopy
?
pub fn unwrap_table_copy(&self) -> &TableCopy
[src]
Get a shared reference to the underlying TableCopy
.
Panics if this instruction is not a TableCopy
.
pub fn unwrap_table_copy_mut(&mut self) -> &mut TableCopy
[src]
Get an exclusive reference to the underlying TableCopy
.
Panics if this instruction is not a TableCopy
.
impl Instr
[src]
pub fn following_instructions_are_unreachable(&self) -> bool
[src]
Are any instructions that follow this instruction's instruction (within the current block) unreachable?
Returns true
for unconditional branches (br
, return
, etc...) and
unreachable
. Returns false
for all other "normal" instructions
(i32.add
, etc...).
Trait Implementations
impl Clone for Instr
[src]
impl Debug for Instr
[src]
impl From<AtomicFence> for Instr
[src]
fn from(x: AtomicFence) -> Instr
[src]
impl From<AtomicNotify> for Instr
[src]
fn from(x: AtomicNotify) -> Instr
[src]
impl From<AtomicRmw> for Instr
[src]
impl From<AtomicWait> for Instr
[src]
fn from(x: AtomicWait) -> Instr
[src]
impl From<Binop> for Instr
[src]
impl From<Block> for Instr
[src]
impl From<Br> for Instr
[src]
impl From<BrIf> for Instr
[src]
impl From<BrTable> for Instr
[src]
impl From<Call> for Instr
[src]
impl From<CallIndirect> for Instr
[src]
fn from(x: CallIndirect) -> Instr
[src]
impl From<Cmpxchg> for Instr
[src]
impl From<Const> for Instr
[src]
impl From<DataDrop> for Instr
[src]
impl From<Drop> for Instr
[src]
impl From<ElemDrop> for Instr
[src]
impl From<GlobalGet> for Instr
[src]
impl From<GlobalSet> for Instr
[src]
impl From<IfElse> for Instr
[src]
impl From<Load> for Instr
[src]
impl From<LoadSimd> for Instr
[src]
impl From<LocalGet> for Instr
[src]
impl From<LocalSet> for Instr
[src]
impl From<LocalTee> for Instr
[src]
impl From<Loop> for Instr
[src]
impl From<MemoryCopy> for Instr
[src]
fn from(x: MemoryCopy) -> Instr
[src]
impl From<MemoryFill> for Instr
[src]
fn from(x: MemoryFill) -> Instr
[src]
impl From<MemoryGrow> for Instr
[src]
fn from(x: MemoryGrow) -> Instr
[src]
impl From<MemoryInit> for Instr
[src]
fn from(x: MemoryInit) -> Instr
[src]
impl From<MemorySize> for Instr
[src]
fn from(x: MemorySize) -> Instr
[src]
impl From<RefFunc> for Instr
[src]
impl From<RefIsNull> for Instr
[src]
impl From<RefNull> for Instr
[src]
impl From<Return> for Instr
[src]
impl From<Select> for Instr
[src]
impl From<Store> for Instr
[src]
impl From<TableCopy> for Instr
[src]
impl From<TableFill> for Instr
[src]
impl From<TableGet> for Instr
[src]
impl From<TableGrow> for Instr
[src]
impl From<TableInit> for Instr
[src]
impl From<TableSet> for Instr
[src]
impl From<TableSize> for Instr
[src]
impl From<Unop> for Instr
[src]
impl From<Unreachable> for Instr
[src]
fn from(x: Unreachable) -> Instr
[src]
impl From<V128Bitselect> for Instr
[src]
fn from(x: V128Bitselect) -> Instr
[src]
impl From<V128Shuffle> for Instr
[src]
fn from(x: V128Shuffle) -> Instr
[src]
impl From<V128Swizzle> for Instr
[src]
fn from(x: V128Swizzle) -> Instr
[src]
Auto Trait Implementations
impl RefUnwindSafe for Instr
impl Send for Instr
impl Sync for Instr
impl Unpin for Instr
impl UnwindSafe for Instr
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,