[][src]Struct cranelift_codegen::ir::jumptable::JumpTableData

pub struct JumpTableData { /* fields omitted */ }

Contents of a jump table.

All jump tables use 0-based indexing and are densely populated.

Methods

impl JumpTableData[src]

pub fn new() -> Self[src]

Create a new empty jump table.

pub fn with_capacity(capacity: usize) -> Self[src]

Create a new empty jump table with the specified capacity.

pub fn len(&self) -> usize[src]

Get the number of table entries.

pub fn push_entry(&mut self, dest: Block)[src]

Append a table entry.

pub fn branches_to(&self, block: Block) -> bool[src]

Checks if any of the entries branch to block.

pub fn as_slice(&self) -> &[Block][src]

Access the whole table as a slice.

pub fn as_mut_slice(&mut self) -> &mut [Block][src]

Access the whole table as a mutable slice.

pub fn iter(&self) -> Iter<Block>[src]

Returns an iterator over the table.

pub fn iter_mut(&mut self) -> IterMut<Block>[src]

Returns an iterator that allows modifying each value.

Trait Implementations

impl Clone for JumpTableData[src]

impl Display for JumpTableData[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.