pub enum EntityType {
Global(Global),
Memory(Memory),
Tag(Tag),
Table(Table),
Function(EngineOrModuleTypeIndex),
}
Expand description
A type of an item in a wasm module where an item is typically something that can be exported.
Variants§
Global(Global)
A global variable with the specified content type
Memory(Memory)
A linear memory with the specified limits
Tag(Tag)
An event definition.
Table(Table)
A table with the specified element type and limits
Function(EngineOrModuleTypeIndex)
A function type where the index points to the type section and records a function signature.
Implementations§
source§impl EntityType
impl EntityType
sourcepub fn unwrap_global(&self) -> &Global
pub fn unwrap_global(&self) -> &Global
Assert that this entity is a global
sourcepub fn unwrap_memory(&self) -> &Memory
pub fn unwrap_memory(&self) -> &Memory
Assert that this entity is a memory
sourcepub fn unwrap_tag(&self) -> &Tag
pub fn unwrap_tag(&self) -> &Tag
Assert that this entity is a tag
sourcepub fn unwrap_table(&self) -> &Table
pub fn unwrap_table(&self) -> &Table
Assert that this entity is a table
sourcepub fn unwrap_func(&self) -> EngineOrModuleTypeIndex
pub fn unwrap_func(&self) -> EngineOrModuleTypeIndex
Assert that this entity is a function
Trait Implementations§
source§impl Clone for EntityType
impl Clone for EntityType
source§fn clone(&self) -> EntityType
fn clone(&self) -> EntityType
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 EntityType
impl Debug for EntityType
source§impl<'de> Deserialize<'de> for EntityType
impl<'de> Deserialize<'de> for EntityType
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 Serialize for EntityType
impl Serialize for EntityType
source§impl TypeTrace for EntityType
impl TypeTrace for EntityType
source§fn trace_mut<F, E>(&mut self, func: &mut F) -> Result<(), E>
fn trace_mut<F, E>(&mut self, func: &mut F) -> Result<(), E>
Visit each edge, mutably. Read more
source§fn trace_engine_indices<F, E>(&self, func: &mut F) -> Result<(), E>
fn trace_engine_indices<F, E>(&self, func: &mut F) -> Result<(), E>
Trace all
VMSharedTypeIndex
edges, ignoring other edges.source§fn canonicalize_for_runtime_usage<F>(&mut self, module_to_engine: &mut F)
fn canonicalize_for_runtime_usage<F>(&mut self, module_to_engine: &mut F)
Canonicalize
self
by rewriting all type references inside self
from
module-level interned type indices to engine-level interned type
indices. Read moresource§fn is_canonicalized_for_runtime_usage(&self) -> bool
fn is_canonicalized_for_runtime_usage(&self) -> bool
Is this type canonicalized for runtime usage?
source§fn canonicalize_for_hash_consing<F>(
&mut self,
rec_group_range: Range<ModuleInternedTypeIndex>,
module_to_engine: &mut F,
)
fn canonicalize_for_hash_consing<F>( &mut self, rec_group_range: Range<ModuleInternedTypeIndex>, module_to_engine: &mut F, )
Canonicalize
self
by rewriting all type references inside self
from
module-level interned type indices to either engine-level interned type
indices or recgroup-relative indices. Read moresource§fn is_canonicalized_for_hash_consing(&self) -> bool
fn is_canonicalized_for_hash_consing(&self) -> bool
Is this type canonicalized for hash consing?
Auto Trait Implementations§
impl Freeze for EntityType
impl RefUnwindSafe for EntityType
impl Send for EntityType
impl Sync for EntityType
impl Unpin for EntityType
impl UnwindSafe for EntityType
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<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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)