wasmtime_environ

Trait EntityRef

Source
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§

Source

fn new(_: usize) -> Self

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

Source

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