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
.