pub enum EngineOrModuleTypeIndex {
Engine(VMSharedTypeIndex),
Module(ModuleInternedTypeIndex),
RecGroup(RecGroupRelativeTypeIndex),
}
Expand description
An interned type index, either at the module or engine level.
Roughly equivalent to wasmparser::UnpackedIndex
, although doesn’t have to
concern itself with recursion-group-local indices.
Variants§
Engine(VMSharedTypeIndex)
An index within an engine, canonicalized among all modules that can interact with each other.
Module(ModuleInternedTypeIndex)
An index within the current Wasm module, canonicalized within just this current module.
RecGroup(RecGroupRelativeTypeIndex)
An index within the containing type’s rec group. This is only used when hashing and canonicalizing rec groups, and should never appear outside of the engine’s type registry.
Implementations§
source§impl EngineOrModuleTypeIndex
impl EngineOrModuleTypeIndex
sourcepub fn is_engine_type_index(self) -> bool
pub fn is_engine_type_index(self) -> bool
Is this an engine-level type index?
sourcepub fn as_engine_type_index(self) -> Option<VMSharedTypeIndex>
pub fn as_engine_type_index(self) -> Option<VMSharedTypeIndex>
Get the underlying engine-level type index, if any.
sourcepub fn unwrap_engine_type_index(self) -> VMSharedTypeIndex
pub fn unwrap_engine_type_index(self) -> VMSharedTypeIndex
Get the underlying engine-level type index, or panic.
sourcepub fn is_module_type_index(self) -> bool
pub fn is_module_type_index(self) -> bool
Is this an module-level type index?
sourcepub fn as_module_type_index(self) -> Option<ModuleInternedTypeIndex>
pub fn as_module_type_index(self) -> Option<ModuleInternedTypeIndex>
Get the underlying module-level type index, if any.
sourcepub fn unwrap_module_type_index(self) -> ModuleInternedTypeIndex
pub fn unwrap_module_type_index(self) -> ModuleInternedTypeIndex
Get the underlying module-level type index, or panic.
sourcepub fn is_rec_group_type_index(self) -> bool
pub fn is_rec_group_type_index(self) -> bool
Is this an recgroup-level type index?
sourcepub fn as_rec_group_type_index(self) -> Option<RecGroupRelativeTypeIndex>
pub fn as_rec_group_type_index(self) -> Option<RecGroupRelativeTypeIndex>
Get the underlying recgroup-level type index, if any.
sourcepub fn unwrap_rec_group_type_index(self) -> RecGroupRelativeTypeIndex
pub fn unwrap_rec_group_type_index(self) -> RecGroupRelativeTypeIndex
Get the underlying module-level type index, or panic.
Trait Implementations§
source§impl Clone for EngineOrModuleTypeIndex
impl Clone for EngineOrModuleTypeIndex
source§fn clone(&self) -> EngineOrModuleTypeIndex
fn clone(&self) -> EngineOrModuleTypeIndex
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EngineOrModuleTypeIndex
impl Debug for EngineOrModuleTypeIndex
source§impl<'de> Deserialize<'de> for EngineOrModuleTypeIndex
impl<'de> Deserialize<'de> for EngineOrModuleTypeIndex
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Display for EngineOrModuleTypeIndex
impl Display for EngineOrModuleTypeIndex
source§impl From<ModuleInternedTypeIndex> for EngineOrModuleTypeIndex
impl From<ModuleInternedTypeIndex> for EngineOrModuleTypeIndex
source§fn from(i: ModuleInternedTypeIndex) -> Self
fn from(i: ModuleInternedTypeIndex) -> Self
source§impl From<RecGroupRelativeTypeIndex> for EngineOrModuleTypeIndex
impl From<RecGroupRelativeTypeIndex> for EngineOrModuleTypeIndex
source§fn from(i: RecGroupRelativeTypeIndex) -> Self
fn from(i: RecGroupRelativeTypeIndex) -> Self
source§fn from(i: VMSharedTypeIndex) -> Self
fn from(i: VMSharedTypeIndex) -> Self
source§impl Hash for EngineOrModuleTypeIndex
impl Hash for EngineOrModuleTypeIndex
source§impl PartialEq for EngineOrModuleTypeIndex
impl PartialEq for EngineOrModuleTypeIndex
source§impl Serialize for EngineOrModuleTypeIndex
impl Serialize for EngineOrModuleTypeIndex
impl Copy for EngineOrModuleTypeIndex
impl Eq for EngineOrModuleTypeIndex
impl StructuralPartialEq for EngineOrModuleTypeIndex
Auto Trait Implementations§
impl Freeze for EngineOrModuleTypeIndex
impl RefUnwindSafe for EngineOrModuleTypeIndex
impl Send for EngineOrModuleTypeIndex
impl Sync for EngineOrModuleTypeIndex
impl Unpin for EngineOrModuleTypeIndex
impl UnwindSafe for EngineOrModuleTypeIndex
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> IntoAnyhow for T
impl<T> IntoAnyhow for T
source§fn into_anyhow(self) -> Error
fn into_anyhow(self) -> Error
self
into an anyhow::Error
.