pub struct JumpTable {
pub branches: Vec<JumpCondition>,
pub default: Vec<Operation>,
pub return: Vec<WasmType>,
}Expand description
switch {
when x == 0:
...
when x == 2:
...
else:
...
}
Fields§
§branches: Vec<JumpCondition>§default: Vec<Operation>§return: Vec<WasmType>Trait Implementations§
source§impl WasmInstruction for JumpTable
impl WasmInstruction for JumpTable
source§fn emit<'a, 'i>(&'a self, w: &mut Vec<Instruction<'i>>)where
'a: 'i,
fn emit<'a, 'i>(&'a self, w: &mut Vec<Instruction<'i>>)where
'a: 'i,
if a { a_body }
else if b { b_body }
else { c_body }
a
if
a_body
else
b
if
b_body
else
c_body
end
end
Auto Trait Implementations§
impl RefUnwindSafe for JumpTable
impl Send for JumpTable
impl Sync for JumpTable
impl Unpin for JumpTable
impl UnwindSafe for JumpTable
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