pub struct JumpTableEntry {
pub case: u64,
pub target: u64,
}Expand description
One entry inside an Item::JumpTable block: a case index and
the address it dispatches to. The case ordering is the encoded
table order — entries lower in source-text order render at
(addr + i * entry_size).
Fields§
§case: u64Case index — 0, 1, … for dense tables; sparse tables
preserve gaps via case numbers that aren’t strictly
contiguous (rare in practice — most compilers normalise to
a dense table with a default arm).
target: u64Target address the case dispatches to. Renders as
label_<addr:x> in source text — the same label name a
Stmt::Goto would produce.
Trait Implementations§
Source§impl Clone for JumpTableEntry
impl Clone for JumpTableEntry
Source§fn clone(&self) -> JumpTableEntry
fn clone(&self) -> JumpTableEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JumpTableEntry
impl Debug for JumpTableEntry
Source§impl PartialEq for JumpTableEntry
impl PartialEq for JumpTableEntry
Source§fn eq(&self, other: &JumpTableEntry) -> bool
fn eq(&self, other: &JumpTableEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for JumpTableEntry
impl StructuralPartialEq for JumpTableEntry
Auto Trait Implementations§
impl Freeze for JumpTableEntry
impl RefUnwindSafe for JumpTableEntry
impl Send for JumpTableEntry
impl Sync for JumpTableEntry
impl Unpin for JumpTableEntry
impl UnsafeUnpin for JumpTableEntry
impl UnwindSafe for JumpTableEntry
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