wasmtime_environ

Trait EntityRef

pub trait EntityRef: Copy + Eq {
    // Required methods
    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

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

source§

impl EntityRef for AdapterId

source§

impl EntityRef for AdapterModuleId

source§

impl EntityRef for InstanceId

source§

impl EntityRef for MemoryId

source§

impl EntityRef for PostReturnId

source§

impl EntityRef for ReallocId

source§

impl EntityRef for ComponentFuncIndex

source§

impl EntityRef for ComponentIndex

source§

impl EntityRef for ComponentInstanceIndex

source§

impl EntityRef for ComponentTypeIndex

source§

impl EntityRef for ComponentUpvarIndex

source§

impl EntityRef for DefinedResourceIndex

source§

impl EntityRef for ExportIndex

source§

impl EntityRef for ImportIndex

source§

impl EntityRef for LoweredIndex

source§

impl EntityRef for ModuleIndex

source§

impl EntityRef for ModuleInstanceIndex

source§

impl EntityRef for ModuleUpvarIndex

source§

impl EntityRef for ResourceIndex

source§

impl EntityRef for RuntimeComponentInstanceIndex

source§

impl EntityRef for RuntimeImportIndex

source§

impl EntityRef for RuntimeInstanceIndex

source§

impl EntityRef for RuntimeMemoryIndex

source§

impl EntityRef for RuntimePostReturnIndex

source§

impl EntityRef for RuntimeReallocIndex

source§

impl EntityRef for StaticComponentIndex

source§

impl EntityRef for TrampolineIndex

source§

impl EntityRef for TypeComponentIndex

source§

impl EntityRef for TypeComponentInstanceIndex

source§

impl EntityRef for TypeEnumIndex

source§

impl EntityRef for TypeFlagsIndex

source§

impl EntityRef for TypeFuncIndex

source§

impl EntityRef for TypeListIndex

source§

impl EntityRef for TypeModuleIndex

source§

impl EntityRef for TypeOptionIndex

source§

impl EntityRef for TypeRecordIndex

source§

impl EntityRef for TypeResourceTableIndex

source§

impl EntityRef for TypeResultIndex

source§

impl EntityRef for TypeTupleIndex

source§

impl EntityRef for TypeVariantIndex

source§

impl EntityRef for DataIndex

source§

impl EntityRef for DefinedFuncIndex

source§

impl EntityRef for DefinedGlobalIndex

source§

impl EntityRef for DefinedMemoryIndex

source§

impl EntityRef for DefinedTableIndex

source§

impl EntityRef for ElemIndex

source§

impl EntityRef for EngineInternedRecGroupIndex

source§

impl EntityRef for FuncIndex

source§

impl EntityRef for FuncRefIndex

source§

impl EntityRef for GlobalIndex

source§

impl EntityRef for MemoryIndex

source§

impl EntityRef for ModuleInternedRecGroupIndex

source§

impl EntityRef for ModuleInternedTypeIndex

source§

impl EntityRef for OwnedMemoryIndex

source§

impl EntityRef for RecGroupRelativeTypeIndex

source§

impl EntityRef for StaticModuleIndex

source§

impl EntityRef for TableIndex

source§

impl EntityRef for TagIndex

source§

impl EntityRef for TypeIndex

source§

impl EntityRef for VMSharedTypeIndex