pub struct TypeModule {
pub imports: IndexMap<(String, String), EntityType>,
pub exports: IndexMap<String, EntityType>,
}
Expand description
The type of a module in the component model.
Note that this is not to be confused with TypeComponent
below. This is
intended only for core wasm modules, not for components.
Fields§
§imports: IndexMap<(String, String), EntityType>
The values that this module imports.
Note that the value of this map is a core wasm EntityType
, not a
component model TypeRef
. Additionally note that this reflects the
two-level namespace of core WebAssembly, but unlike core wasm all import
names are required to be unique to describe a module in the component
model.
exports: IndexMap<String, EntityType>
The values that this module exports.
Note that the value of this map is the core wasm EntityType
to
represent that core wasm items are being exported.
Trait Implementations§
Source§impl Default for TypeModule
impl Default for TypeModule
Source§fn default() -> TypeModule
fn default() -> TypeModule
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TypeModule
impl<'de> Deserialize<'de> for TypeModule
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 TypeModule
impl Serialize for TypeModule
Source§impl TypeTrace for TypeModule
impl TypeTrace for TypeModule
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 TypeModule
impl RefUnwindSafe for TypeModule
impl Send for TypeModule
impl Sync for TypeModule
impl Unpin for TypeModule
impl UnwindSafe for TypeModule
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