pub enum EngineOrModuleTypeIndex {
Engine(u32),
Module(ModuleInternedTypeIndex),
}
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(u32)
An index within a global namespace across all modules that can interact
with each other (in practice this is a VMSharedTypeIndex
at the per
wasmtime::Engine
level).
Module(ModuleInternedTypeIndex)
An index within the current Wasm module.
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<u32>
pub fn as_engine_type_index(self) -> Option<u32>
Get the underlying engine-level type index, if any.
sourcepub fn unwrap_engine_type_index(self) -> u32
pub fn unwrap_engine_type_index(self) -> u32
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.
Trait Implementations§
source§impl Clone for EngineOrModuleTypeIndex
impl Clone for EngineOrModuleTypeIndex
source§fn clone(&self) -> EngineOrModuleTypeIndex
fn clone(&self) -> EngineOrModuleTypeIndex
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
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
Converts to this type from the input type.
source§impl Hash for EngineOrModuleTypeIndex
impl Hash for EngineOrModuleTypeIndex
source§impl PartialEq for EngineOrModuleTypeIndex
impl PartialEq for EngineOrModuleTypeIndex
source§fn eq(&self, other: &EngineOrModuleTypeIndex) -> bool
fn eq(&self, other: &EngineOrModuleTypeIndex) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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
Mutably borrows from an owned value. Read more
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
Compare self to
key
and return true
if they are equal.