pub struct JumpTable {
pub targets: Vec<Target>,
pub default: Target,
}Expand description
A jump table of Inst::Switch: targets[v] for a
selector v in range, default otherwise.
§Examples
use bytecode_lang::{JumpTable, Target};
let t = JumpTable { targets: vec![Target(4), Target(9)], default: Target(12) };
assert_eq!(t.targets.len(), 2);Fields§
§targets: Vec<Target>Targets for selectors 0..len.
default: TargetThe target for every other selector.
Trait Implementations§
impl Eq for JumpTable
Source§impl Ord for JumpTable
impl Ord for JumpTable
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for JumpTable
impl PartialOrd for JumpTable
impl StructuralPartialEq for JumpTable
Auto Trait Implementations§
impl Freeze for JumpTable
impl RefUnwindSafe for JumpTable
impl Send for JumpTable
impl Sync for JumpTable
impl Unpin for JumpTable
impl UnsafeUnpin 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