Struct cranelift_codegen::ir::jumptable::JumpTableData
source · [−]pub struct JumpTableData { /* private fields */ }
Expand description
Contents of a jump table.
All jump tables use 0-based indexing and are densely populated.
Implementations
sourceimpl JumpTableData
impl JumpTableData
sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a new empty jump table with the specified capacity.
sourcepub fn push_entry(&mut self, dest: Block)
pub fn push_entry(&mut self, dest: Block)
Append a table entry.
sourcepub fn branches_to(&self, block: Block) -> bool
pub fn branches_to(&self, block: Block) -> bool
Checks if any of the entries branch to block
.
sourcepub fn as_mut_slice(&mut self) -> &mut [Block]
pub fn as_mut_slice(&mut self) -> &mut [Block]
Access the whole table as a mutable slice.
Trait Implementations
sourceimpl Clone for JumpTableData
impl Clone for JumpTableData
sourcefn clone(&self) -> JumpTableData
fn clone(&self) -> JumpTableData
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Display for JumpTableData
impl Display for JumpTableData
sourceimpl Hash for JumpTableData
impl Hash for JumpTableData
sourceimpl PartialEq<JumpTableData> for JumpTableData
impl PartialEq<JumpTableData> for JumpTableData
sourcefn eq(&self, other: &JumpTableData) -> bool
fn eq(&self, other: &JumpTableData) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &JumpTableData) -> bool
fn ne(&self, other: &JumpTableData) -> bool
This method tests for !=
.
impl StructuralPartialEq for JumpTableData
Auto Trait Implementations
impl RefUnwindSafe for JumpTableData
impl Send for JumpTableData
impl Sync for JumpTableData
impl Unpin for JumpTableData
impl UnwindSafe for JumpTableData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more