Trait wasmtime_environ::entity::EntityRef[][src]

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

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[src]

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

fn index(self) -> usize[src]

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

Implementations on Foreign Types

impl EntityRef for Inst[src]

pub fn new(index: usize) -> Inst[src]

pub fn index(self) -> usize[src]

impl EntityRef for StackSlot[src]

pub fn new(index: usize) -> StackSlot[src]

pub fn index(self) -> usize[src]

impl EntityRef for Heap[src]

pub fn new(index: usize) -> Heap[src]

pub fn index(self) -> usize[src]

impl EntityRef for GlobalValue[src]

pub fn new(index: usize) -> GlobalValue[src]

pub fn index(self) -> usize[src]

impl EntityRef for Constant[src]

pub fn new(index: usize) -> Constant[src]

pub fn index(self) -> usize[src]

impl EntityRef for Immediate[src]

pub fn new(index: usize) -> Immediate[src]

pub fn index(self) -> usize[src]

impl EntityRef for VCodeConstant[src]

pub fn new(index: usize) -> VCodeConstant[src]

pub fn index(self) -> usize[src]

impl EntityRef for SigRef[src]

pub fn new(index: usize) -> SigRef[src]

pub fn index(self) -> usize[src]

impl EntityRef for Value[src]

pub fn new(index: usize) -> Value[src]

pub fn index(self) -> usize[src]

impl EntityRef for Loop[src]

pub fn new(index: usize) -> Loop[src]

pub fn index(self) -> usize[src]

impl EntityRef for RegClassIndex[src]

pub fn new(idx: usize) -> RegClassIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for MachLabel[src]

pub fn new(index: usize) -> MachLabel[src]

pub fn index(self) -> usize[src]

impl EntityRef for JumpTable[src]

pub fn new(index: usize) -> JumpTable[src]

pub fn index(self) -> usize[src]

impl EntityRef for FuncRef[src]

pub fn new(index: usize) -> FuncRef[src]

pub fn index(self) -> usize[src]

impl EntityRef for Table[src]

pub fn new(index: usize) -> Table[src]

pub fn index(self) -> usize[src]

impl EntityRef for Block[src]

pub fn new(index: usize) -> Block[src]

pub fn index(self) -> usize[src]

impl EntityRef for Variable

pub fn new(index: usize) -> Variable

pub fn index(self) -> usize

Implementors

impl EntityRef for ValueLabel[src]

pub fn new(index: usize) -> ValueLabel[src]

pub fn index(self) -> usize[src]

impl EntityRef for DataIndex[src]

pub fn new(index: usize) -> DataIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for DefinedFuncIndex[src]

pub fn new(index: usize) -> DefinedFuncIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for DefinedGlobalIndex[src]

pub fn new(index: usize) -> DefinedGlobalIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for DefinedMemoryIndex[src]

pub fn new(index: usize) -> DefinedMemoryIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for DefinedTableIndex[src]

pub fn new(index: usize) -> DefinedTableIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for ElemIndex[src]

pub fn new(index: usize) -> ElemIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for EventIndex[src]

pub fn new(index: usize) -> EventIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for FuncIndex[src]

pub fn new(index: usize) -> FuncIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for GlobalIndex[src]

pub fn new(index: usize) -> GlobalIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for InstanceIndex[src]

pub fn new(index: usize) -> InstanceIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for InstanceTypeIndex[src]

pub fn new(index: usize) -> InstanceTypeIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for MemoryIndex[src]

pub fn new(index: usize) -> MemoryIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for ModuleIndex[src]

pub fn new(index: usize) -> ModuleIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for ModuleTypeIndex[src]

pub fn new(index: usize) -> ModuleTypeIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for SignatureIndex[src]

pub fn new(index: usize) -> SignatureIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for TableIndex[src]

pub fn new(index: usize) -> TableIndex[src]

pub fn index(self) -> usize[src]

impl EntityRef for TypeIndex[src]

pub fn new(index: usize) -> TypeIndex[src]

pub fn index(self) -> usize[src]