Trait wasmer_types::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.

Implementors

impl EntityRef for CustomSectionIndex[src]

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

fn index(self) -> usize[src]

impl EntityRef for DataIndex[src]

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

fn index(self) -> usize[src]

impl EntityRef for ElemIndex[src]

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

fn index(self) -> usize[src]

impl EntityRef for FunctionIndex[src]

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

fn index(self) -> usize[src]

impl EntityRef for GlobalIndex[src]

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

fn index(self) -> usize[src]

impl EntityRef for LocalFunctionIndex[src]

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

fn index(self) -> usize[src]

impl EntityRef for LocalGlobalIndex[src]

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

fn index(self) -> usize[src]

impl EntityRef for LocalMemoryIndex[src]

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

fn index(self) -> usize[src]

impl EntityRef for LocalTableIndex[src]

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

fn index(self) -> usize[src]

impl EntityRef for MemoryIndex[src]

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

fn index(self) -> usize[src]

impl EntityRef for SignatureIndex[src]

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

fn index(self) -> usize[src]

impl EntityRef for TableIndex[src]

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

fn index(self) -> usize[src]