pub struct JumpTable(/* private fields */);Expand description
An opaque reference to a jump table.
JumpTables are used for indirect branching and are specialized for dense,
0-based jump offsets. If you want a jump table which doesn’t start at 0,
or is not contiguous, consider using a Switch instead.
JumpTable are used with br_table.
JumpTables can be created with
create_jump_table.
While the order is stable, it is arbitrary.
Implementations§
Source§impl JumpTable
 
impl JumpTable
Sourcepub fn as_bits(self) -> u32
 
pub fn as_bits(self) -> u32
Return the raw bit encoding for this instance.
Warning: the raw bit encoding is opaque and has no
guaranteed correspondence to the entity’s index. It encodes the
entire state of this index value: either a valid index or an
invalid-index sentinel. The value returned by this method should
only be passed to from_bits.
Sourcepub fn from_bits(x: u32) -> Self
 
pub fn from_bits(x: u32) -> Self
Create a new instance from the raw bit encoding.
Warning: the raw bit encoding is opaque and has no
guaranteed correspondence to the entity’s index. It encodes the
entire state of this index value: either a valid index or an
invalid-index sentinel. The value returned by this method should
only be given bits from as_bits.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JumpTable
 
impl<'de> Deserialize<'de> for JumpTable
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Source§impl Ord for JumpTable
 
impl Ord for JumpTable
Source§impl PartialOrd for JumpTable
 
impl PartialOrd for JumpTable
Source§impl ReservedValue for JumpTable
 
impl ReservedValue for JumpTable
Source§fn reserved_value() -> JumpTable
 
fn reserved_value() -> JumpTable
Source§fn is_reserved_value(&self) -> bool
 
fn is_reserved_value(&self) -> bool
impl Copy for JumpTable
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
§impl<Q, K> Comparable<K> for Q
 
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.