[−][src]Enum walrus::ir::Expr
An enum of all the different kinds of wasm expressions.
Note that the #[walrus_expr]
macro rewrites this enum's variants from
enum Expr { Variant { field: Ty, .. }, ... }
into
enum Expr { Variant(Variant), ... } struct Variant { field: Ty, ... }
Variants
Block(Block)
A block of multiple expressions, and also a control frame.
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 ... else ... 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)
Loading a value from memory
Store(Store)
Storing a value to memory
AtomicRmw(AtomicRmw)
An atomic read/modify/write operation
Cmpxchg(Cmpxchg)
An atomic compare exchange operation
AtomicNotify(AtomicNotify)
The atomic.notify
instruction to wake up threads
AtomicWait(AtomicWait)
The *.atomic.wait
instruction to block threads
WithSideEffects(WithSideEffects)
A value followed by one or more stack-neutral, side-effecting expressions.
This allows us to express "stacky" and "non-tree-like" expressions such as:
;; Assuming `f` has type `[] -> i32` and potential side effects.
call $f
call $f
call $f
drop
i32.add
Without WithSideEffects
, we would need to create a synthetic block
with a temporary local like this:
(i32.added
(call $f)
(block
(set_local $temp (call $f))
(drop (call $f))
(get_local $temp)
end))
But using WithoutSideEffects
we can represent this like so:
(i32.add
(with_side_effects
;; value
(call $f)
;; side_effects
(drop (call $f)))
(call $f))
TableGet(TableGet)
table.get
TableSet(TableSet)
table.set
TableGrow(TableGrow)
table.grow
TableSize(TableSize)
table.size
RefNull(RefNull)
ref.null
RefIsNull(RefIsNull)
ref.is_null
V128Bitselect(V128Bitselect)
v128.bitselect
V128Swizzle(V128Swizzle)
v128.swizzle
V128Shuffle(V128Shuffle)
v128.shuffle
LoadSplat(LoadSplat)
iaaxbb.load_splat
Methods
impl Expr
[src]
pub fn block_mut(&mut self) -> Option<&mut Block>
[src]
If this expression is a Block
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_block(&self) -> bool
[src]
Is this expression a Block
?
pub fn unwrap_block(&self) -> &Block
[src]
Get a shared reference to the underlying Block
.
Panics if this expression 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 expression is not a Block
.
pub fn call_mut(&mut self) -> Option<&mut Call>
[src]
If this expression is a Call
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_call(&self) -> bool
[src]
Is this expression a Call
?
pub fn unwrap_call(&self) -> &Call
[src]
Get a shared reference to the underlying Call
.
Panics if this expression 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 expression is not a Call
.
pub fn call_indirect_mut(&mut self) -> Option<&mut CallIndirect>
[src]
If this expression is a CallIndirect
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_call_indirect(&self) -> bool
[src]
Is this expression a CallIndirect
?
pub fn unwrap_call_indirect(&self) -> &CallIndirect
[src]
Get a shared reference to the underlying CallIndirect
.
Panics if this expression 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 expression is not a CallIndirect
.
pub fn local_get_mut(&mut self) -> Option<&mut LocalGet>
[src]
If this expression is a LocalGet
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_local_get(&self) -> bool
[src]
Is this expression a LocalGet
?
pub fn unwrap_local_get(&self) -> &LocalGet
[src]
Get a shared reference to the underlying LocalGet
.
Panics if this expression 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 expression is not a LocalGet
.
pub fn local_set_mut(&mut self) -> Option<&mut LocalSet>
[src]
If this expression is a LocalSet
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_local_set(&self) -> bool
[src]
Is this expression a LocalSet
?
pub fn unwrap_local_set(&self) -> &LocalSet
[src]
Get a shared reference to the underlying LocalSet
.
Panics if this expression 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 expression is not a LocalSet
.
pub fn local_tee_mut(&mut self) -> Option<&mut LocalTee>
[src]
If this expression is a LocalTee
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_local_tee(&self) -> bool
[src]
Is this expression a LocalTee
?
pub fn unwrap_local_tee(&self) -> &LocalTee
[src]
Get a shared reference to the underlying LocalTee
.
Panics if this expression 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 expression is not a LocalTee
.
pub fn global_get_mut(&mut self) -> Option<&mut GlobalGet>
[src]
If this expression is a GlobalGet
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_global_get(&self) -> bool
[src]
Is this expression a GlobalGet
?
pub fn unwrap_global_get(&self) -> &GlobalGet
[src]
Get a shared reference to the underlying GlobalGet
.
Panics if this expression 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 expression is not a GlobalGet
.
pub fn global_set_mut(&mut self) -> Option<&mut GlobalSet>
[src]
If this expression is a GlobalSet
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_global_set(&self) -> bool
[src]
Is this expression a GlobalSet
?
pub fn unwrap_global_set(&self) -> &GlobalSet
[src]
Get a shared reference to the underlying GlobalSet
.
Panics if this expression 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 expression is not a GlobalSet
.
pub fn const_mut(&mut self) -> Option<&mut Const>
[src]
If this expression is a Const
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_const(&self) -> bool
[src]
Is this expression a Const
?
pub fn unwrap_const(&self) -> &Const
[src]
Get a shared reference to the underlying Const
.
Panics if this expression 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 expression is not a Const
.
pub fn binop_mut(&mut self) -> Option<&mut Binop>
[src]
If this expression is a Binop
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_binop(&self) -> bool
[src]
Is this expression a Binop
?
pub fn unwrap_binop(&self) -> &Binop
[src]
Get a shared reference to the underlying Binop
.
Panics if this expression 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 expression is not a Binop
.
pub fn unop_mut(&mut self) -> Option<&mut Unop>
[src]
If this expression is a Unop
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_unop(&self) -> bool
[src]
Is this expression a Unop
?
pub fn unwrap_unop(&self) -> &Unop
[src]
Get a shared reference to the underlying Unop
.
Panics if this expression 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 expression is not a Unop
.
pub fn select_mut(&mut self) -> Option<&mut Select>
[src]
If this expression is a Select
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_select(&self) -> bool
[src]
Is this expression a Select
?
pub fn unwrap_select(&self) -> &Select
[src]
Get a shared reference to the underlying Select
.
Panics if this expression 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 expression is not a Select
.
pub fn unreachable_mut(&mut self) -> Option<&mut Unreachable>
[src]
If this expression is a Unreachable
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_unreachable(&self) -> bool
[src]
Is this expression a Unreachable
?
pub fn unwrap_unreachable(&self) -> &Unreachable
[src]
Get a shared reference to the underlying Unreachable
.
Panics if this expression 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 expression is not a Unreachable
.
pub fn br_mut(&mut self) -> Option<&mut Br>
[src]
If this expression is a Br
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_br(&self) -> bool
[src]
Is this expression a Br
?
pub fn unwrap_br(&self) -> &Br
[src]
Get a shared reference to the underlying Br
.
Panics if this expression 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 expression is not a Br
.
pub fn br_if_mut(&mut self) -> Option<&mut BrIf>
[src]
If this expression is a BrIf
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_br_if(&self) -> bool
[src]
Is this expression a BrIf
?
pub fn unwrap_br_if(&self) -> &BrIf
[src]
Get a shared reference to the underlying BrIf
.
Panics if this expression 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 expression is not a BrIf
.
pub fn if_else_mut(&mut self) -> Option<&mut IfElse>
[src]
If this expression is a IfElse
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_if_else(&self) -> bool
[src]
Is this expression a IfElse
?
pub fn unwrap_if_else(&self) -> &IfElse
[src]
Get a shared reference to the underlying IfElse
.
Panics if this expression 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 expression is not a IfElse
.
pub fn br_table_mut(&mut self) -> Option<&mut BrTable>
[src]
If this expression is a BrTable
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_br_table(&self) -> bool
[src]
Is this expression a BrTable
?
pub fn unwrap_br_table(&self) -> &BrTable
[src]
Get a shared reference to the underlying BrTable
.
Panics if this expression 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 expression is not a BrTable
.
pub fn drop_mut(&mut self) -> Option<&mut Drop>
[src]
If this expression is a Drop
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_drop(&self) -> bool
[src]
Is this expression a Drop
?
pub fn unwrap_drop(&self) -> &Drop
[src]
Get a shared reference to the underlying Drop
.
Panics if this expression 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 expression is not a Drop
.
pub fn return_mut(&mut self) -> Option<&mut Return>
[src]
If this expression is a Return
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_return(&self) -> bool
[src]
Is this expression a Return
?
pub fn unwrap_return(&self) -> &Return
[src]
Get a shared reference to the underlying Return
.
Panics if this expression 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 expression is not a Return
.
pub fn memory_size_mut(&mut self) -> Option<&mut MemorySize>
[src]
If this expression is a MemorySize
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_memory_size(&self) -> bool
[src]
Is this expression a MemorySize
?
pub fn unwrap_memory_size(&self) -> &MemorySize
[src]
Get a shared reference to the underlying MemorySize
.
Panics if this expression 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 expression is not a MemorySize
.
pub fn memory_grow_mut(&mut self) -> Option<&mut MemoryGrow>
[src]
If this expression is a MemoryGrow
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_memory_grow(&self) -> bool
[src]
Is this expression a MemoryGrow
?
pub fn unwrap_memory_grow(&self) -> &MemoryGrow
[src]
Get a shared reference to the underlying MemoryGrow
.
Panics if this expression 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 expression is not a MemoryGrow
.
pub fn memory_init_mut(&mut self) -> Option<&mut MemoryInit>
[src]
If this expression is a MemoryInit
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_memory_init(&self) -> bool
[src]
Is this expression a MemoryInit
?
pub fn unwrap_memory_init(&self) -> &MemoryInit
[src]
Get a shared reference to the underlying MemoryInit
.
Panics if this expression 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 expression is not a MemoryInit
.
pub fn data_drop_mut(&mut self) -> Option<&mut DataDrop>
[src]
If this expression is a DataDrop
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_data_drop(&self) -> bool
[src]
Is this expression a DataDrop
?
pub fn unwrap_data_drop(&self) -> &DataDrop
[src]
Get a shared reference to the underlying DataDrop
.
Panics if this expression 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 expression is not a DataDrop
.
pub fn memory_copy_mut(&mut self) -> Option<&mut MemoryCopy>
[src]
If this expression is a MemoryCopy
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_memory_copy(&self) -> bool
[src]
Is this expression a MemoryCopy
?
pub fn unwrap_memory_copy(&self) -> &MemoryCopy
[src]
Get a shared reference to the underlying MemoryCopy
.
Panics if this expression 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 expression is not a MemoryCopy
.
pub fn memory_fill_mut(&mut self) -> Option<&mut MemoryFill>
[src]
If this expression is a MemoryFill
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_memory_fill(&self) -> bool
[src]
Is this expression a MemoryFill
?
pub fn unwrap_memory_fill(&self) -> &MemoryFill
[src]
Get a shared reference to the underlying MemoryFill
.
Panics if this expression 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 expression is not a MemoryFill
.
pub fn load_mut(&mut self) -> Option<&mut Load>
[src]
If this expression is a Load
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_load(&self) -> bool
[src]
Is this expression a Load
?
pub fn unwrap_load(&self) -> &Load
[src]
Get a shared reference to the underlying Load
.
Panics if this expression 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 expression is not a Load
.
pub fn store_mut(&mut self) -> Option<&mut Store>
[src]
If this expression is a Store
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_store(&self) -> bool
[src]
Is this expression a Store
?
pub fn unwrap_store(&self) -> &Store
[src]
Get a shared reference to the underlying Store
.
Panics if this expression 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 expression is not a Store
.
pub fn atomic_rmw_mut(&mut self) -> Option<&mut AtomicRmw>
[src]
If this expression is a AtomicRmw
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_atomic_rmw(&self) -> bool
[src]
Is this expression a AtomicRmw
?
pub fn unwrap_atomic_rmw(&self) -> &AtomicRmw
[src]
Get a shared reference to the underlying AtomicRmw
.
Panics if this expression 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 expression is not a AtomicRmw
.
pub fn cmpxchg_mut(&mut self) -> Option<&mut Cmpxchg>
[src]
If this expression is a Cmpxchg
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_cmpxchg(&self) -> bool
[src]
Is this expression a Cmpxchg
?
pub fn unwrap_cmpxchg(&self) -> &Cmpxchg
[src]
Get a shared reference to the underlying Cmpxchg
.
Panics if this expression 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 expression is not a Cmpxchg
.
pub fn atomic_notify_mut(&mut self) -> Option<&mut AtomicNotify>
[src]
If this expression is a AtomicNotify
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_atomic_notify(&self) -> bool
[src]
Is this expression a AtomicNotify
?
pub fn unwrap_atomic_notify(&self) -> &AtomicNotify
[src]
Get a shared reference to the underlying AtomicNotify
.
Panics if this expression 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 expression is not a AtomicNotify
.
pub fn atomic_wait_mut(&mut self) -> Option<&mut AtomicWait>
[src]
If this expression is a AtomicWait
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_atomic_wait(&self) -> bool
[src]
Is this expression a AtomicWait
?
pub fn unwrap_atomic_wait(&self) -> &AtomicWait
[src]
Get a shared reference to the underlying AtomicWait
.
Panics if this expression 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 expression is not a AtomicWait
.
pub fn with_side_effects_mut(&mut self) -> Option<&mut WithSideEffects>
[src]
If this expression is a WithSideEffects
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_with_side_effects(&self) -> bool
[src]
Is this expression a WithSideEffects
?
pub fn unwrap_with_side_effects(&self) -> &WithSideEffects
[src]
Get a shared reference to the underlying WithSideEffects
.
Panics if this expression is not a WithSideEffects
.
pub fn unwrap_with_side_effects_mut(&mut self) -> &mut WithSideEffects
[src]
Get an exclusive reference to the underlying WithSideEffects
.
Panics if this expression is not a WithSideEffects
.
pub fn table_get_mut(&mut self) -> Option<&mut TableGet>
[src]
If this expression is a TableGet
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_table_get(&self) -> bool
[src]
Is this expression a TableGet
?
pub fn unwrap_table_get(&self) -> &TableGet
[src]
Get a shared reference to the underlying TableGet
.
Panics if this expression 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 expression is not a TableGet
.
pub fn table_set_mut(&mut self) -> Option<&mut TableSet>
[src]
If this expression is a TableSet
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_table_set(&self) -> bool
[src]
Is this expression a TableSet
?
pub fn unwrap_table_set(&self) -> &TableSet
[src]
Get a shared reference to the underlying TableSet
.
Panics if this expression 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 expression is not a TableSet
.
pub fn table_grow_mut(&mut self) -> Option<&mut TableGrow>
[src]
If this expression is a TableGrow
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_table_grow(&self) -> bool
[src]
Is this expression a TableGrow
?
pub fn unwrap_table_grow(&self) -> &TableGrow
[src]
Get a shared reference to the underlying TableGrow
.
Panics if this expression 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 expression is not a TableGrow
.
pub fn table_size_mut(&mut self) -> Option<&mut TableSize>
[src]
If this expression is a TableSize
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_table_size(&self) -> bool
[src]
Is this expression a TableSize
?
pub fn unwrap_table_size(&self) -> &TableSize
[src]
Get a shared reference to the underlying TableSize
.
Panics if this expression 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 expression is not a TableSize
.
pub fn ref_null_mut(&mut self) -> Option<&mut RefNull>
[src]
If this expression is a RefNull
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_ref_null(&self) -> bool
[src]
Is this expression a RefNull
?
pub fn unwrap_ref_null(&self) -> &RefNull
[src]
Get a shared reference to the underlying RefNull
.
Panics if this expression 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 expression is not a RefNull
.
pub fn ref_is_null_mut(&mut self) -> Option<&mut RefIsNull>
[src]
If this expression is a RefIsNull
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_ref_is_null(&self) -> bool
[src]
Is this expression a RefIsNull
?
pub fn unwrap_ref_is_null(&self) -> &RefIsNull
[src]
Get a shared reference to the underlying RefIsNull
.
Panics if this expression 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 expression is not a RefIsNull
.
pub fn v128_bitselect_mut(&mut self) -> Option<&mut V128Bitselect>
[src]
If this expression is a V128Bitselect
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_v128_bitselect(&self) -> bool
[src]
Is this expression a V128Bitselect
?
pub fn unwrap_v128_bitselect(&self) -> &V128Bitselect
[src]
Get a shared reference to the underlying V128Bitselect
.
Panics if this expression 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 expression is not a V128Bitselect
.
pub fn v128_swizzle_mut(&mut self) -> Option<&mut V128Swizzle>
[src]
If this expression is a V128Swizzle
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_v128_swizzle(&self) -> bool
[src]
Is this expression a V128Swizzle
?
pub fn unwrap_v128_swizzle(&self) -> &V128Swizzle
[src]
Get a shared reference to the underlying V128Swizzle
.
Panics if this expression 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 expression is not a V128Swizzle
.
pub fn v128_shuffle_mut(&mut self) -> Option<&mut V128Shuffle>
[src]
If this expression is a V128Shuffle
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_v128_shuffle(&self) -> bool
[src]
Is this expression a V128Shuffle
?
pub fn unwrap_v128_shuffle(&self) -> &V128Shuffle
[src]
Get a shared reference to the underlying V128Shuffle
.
Panics if this expression 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 expression is not a V128Shuffle
.
pub fn load_splat_mut(&mut self) -> Option<&mut LoadSplat>
[src]
If this expression is a LoadSplat
, get an exclusive reference to it.
Returns None
otherwise.
pub fn is_load_splat(&self) -> bool
[src]
Is this expression a LoadSplat
?
pub fn unwrap_load_splat(&self) -> &LoadSplat
[src]
Get a shared reference to the underlying LoadSplat
.
Panics if this expression is not a LoadSplat
.
pub fn unwrap_load_splat_mut(&mut self) -> &mut LoadSplat
[src]
Get an exclusive reference to the underlying LoadSplat
.
Panics if this expression is not a LoadSplat
.
impl Expr
[src]
pub fn following_instructions_are_unreachable(&self) -> bool
[src]
Are any instructions that follow this expression'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<'expr> Visit<'expr> for Expr
[src]
impl VisitMut for Expr
[src]
fn visit_mut<V>(&mut self, visitor: &mut V) where
V: VisitorMut,
[src]
V: VisitorMut,
impl Clone for Expr
[src]
fn clone(&self) -> Expr
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl From<Block> for Expr
[src]
impl From<Call> for Expr
[src]
impl From<CallIndirect> for Expr
[src]
fn from(x: CallIndirect) -> Expr
[src]
impl From<LocalGet> for Expr
[src]
impl From<LocalSet> for Expr
[src]
impl From<LocalTee> for Expr
[src]
impl From<GlobalGet> for Expr
[src]
impl From<GlobalSet> for Expr
[src]
impl From<Const> for Expr
[src]
impl From<Binop> for Expr
[src]
impl From<Unop> for Expr
[src]
impl From<Select> for Expr
[src]
impl From<Unreachable> for Expr
[src]
fn from(x: Unreachable) -> Expr
[src]
impl From<Br> for Expr
[src]
impl From<BrIf> for Expr
[src]
impl From<IfElse> for Expr
[src]
impl From<BrTable> for Expr
[src]
impl From<Drop> for Expr
[src]
impl From<Return> for Expr
[src]
impl From<MemorySize> for Expr
[src]
fn from(x: MemorySize) -> Expr
[src]
impl From<MemoryGrow> for Expr
[src]
fn from(x: MemoryGrow) -> Expr
[src]
impl From<MemoryInit> for Expr
[src]
fn from(x: MemoryInit) -> Expr
[src]
impl From<DataDrop> for Expr
[src]
impl From<MemoryCopy> for Expr
[src]
fn from(x: MemoryCopy) -> Expr
[src]
impl From<MemoryFill> for Expr
[src]
fn from(x: MemoryFill) -> Expr
[src]
impl From<Load> for Expr
[src]
impl From<Store> for Expr
[src]
impl From<AtomicRmw> for Expr
[src]
impl From<Cmpxchg> for Expr
[src]
impl From<AtomicNotify> for Expr
[src]
fn from(x: AtomicNotify) -> Expr
[src]
impl From<AtomicWait> for Expr
[src]
fn from(x: AtomicWait) -> Expr
[src]
impl From<WithSideEffects> for Expr
[src]
fn from(x: WithSideEffects) -> Expr
[src]
impl From<TableGet> for Expr
[src]
impl From<TableSet> for Expr
[src]
impl From<TableGrow> for Expr
[src]
impl From<TableSize> for Expr
[src]
impl From<RefNull> for Expr
[src]
impl From<RefIsNull> for Expr
[src]
impl From<V128Bitselect> for Expr
[src]
fn from(x: V128Bitselect) -> Expr
[src]
impl From<V128Swizzle> for Expr
[src]
fn from(x: V128Swizzle) -> Expr
[src]
impl From<V128Shuffle> for Expr
[src]
fn from(x: V128Shuffle) -> Expr
[src]
impl From<LoadSplat> for Expr
[src]
impl Debug for Expr
[src]
Auto Trait Implementations
impl Sync for Expr
impl Send for Expr
impl Unpin for Expr
impl RefUnwindSafe for Expr
impl UnwindSafe for Expr
Blanket Implementations
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,