[]Trait cranelift::prelude::EntityRef

pub trait EntityRef: Copy + Eq {
    fn new(usize) -> Self;
fn index(self) -> usize; }

A type wrapping a small integer index should implement EntityRef so it can be used as the key of an SecondaryMap or SparseMap.

Required methods

fn new(usize) -> Self

Create a new entity reference from a small integer. This should crash if the requested index is not representable.

fn index(self) -> usize

Get the index that was used to create this entity reference.

Loading content...

Implementations on Foreign Types

impl EntityRef for Inst

impl EntityRef for StackSlot

impl EntityRef for FuncRef

impl EntityRef for Table

impl EntityRef for Heap

impl EntityRef for JumpTable

impl EntityRef for Loop

impl EntityRef for GlobalValue

impl EntityRef for ValueLabel

impl EntityRef for SigRef

Loading content...

Implementors

impl EntityRef for RegClassIndex[src]

impl EntityRef for Ebb

impl EntityRef for Value

impl EntityRef for Variable[src]

Loading content...