pub struct ComponentTypes { /* private fields */ }Expand description
Runtime information about the type information contained within a component.
One of these is created per top-level component which describes all of the types contained within the top-level component itself. Each sub-component will have a pointer to this value as well.
Implementations§
Source§impl ComponentTypes
 
impl ComponentTypes
Sourcepub fn module_types(&self) -> &ModuleTypes
 
pub fn module_types(&self) -> &ModuleTypes
Returns the core wasm module types known within this component.
Sourcepub fn module_types_mut(&mut self) -> &mut ModuleTypes
 
pub fn module_types_mut(&mut self) -> &mut ModuleTypes
Returns the core wasm module types known within this component.
Sourcepub fn canonical_abi(&self, ty: &InterfaceType) -> &CanonicalAbiInfo
 
pub fn canonical_abi(&self, ty: &InterfaceType) -> &CanonicalAbiInfo
Returns the canonical ABI information about the specified type.
Sourcepub fn push_resource_table(
    &mut self,
    table: TypeResourceTable,
) -> TypeResourceTableIndex
 
pub fn push_resource_table( &mut self, table: TypeResourceTable, ) -> TypeResourceTableIndex
Adds a new table to the list of resource tables for this component.
Trait Implementations§
Source§impl Default for ComponentTypes
 
impl Default for ComponentTypes
Source§fn default() -> ComponentTypes
 
fn default() -> ComponentTypes
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ComponentTypes
 
impl<'de> Deserialize<'de> for ComponentTypes
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<T> Index<T> for ComponentTypeswhere
    ModuleTypes: Index<T>,
 
impl<T> Index<T> for ComponentTypeswhere
    ModuleTypes: Index<T>,
Source§impl Index<TypeComponentIndex> for ComponentTypes
 
impl Index<TypeComponentIndex> for ComponentTypes
Source§type Output = TypeComponent
 
type Output = TypeComponent
The returned type after indexing.
Source§fn index(&self, idx: TypeComponentIndex) -> &TypeComponent
 
fn index(&self, idx: TypeComponentIndex) -> &TypeComponent
Performs the indexing (
container[index]) operation. Read moreSource§impl Index<TypeComponentInstanceIndex> for ComponentTypes
 
impl Index<TypeComponentInstanceIndex> for ComponentTypes
Source§type Output = TypeComponentInstance
 
type Output = TypeComponentInstance
The returned type after indexing.
Source§fn index(&self, idx: TypeComponentInstanceIndex) -> &TypeComponentInstance
 
fn index(&self, idx: TypeComponentInstanceIndex) -> &TypeComponentInstance
Performs the indexing (
container[index]) operation. Read moreSource§impl Index<TypeComponentLocalErrorContextTableIndex> for ComponentTypes
 
impl Index<TypeComponentLocalErrorContextTableIndex> for ComponentTypes
Source§type Output = TypeErrorContextTable
 
type Output = TypeErrorContextTable
The returned type after indexing.
Source§fn index(
    &self,
    idx: TypeComponentLocalErrorContextTableIndex,
) -> &TypeErrorContextTable
 
fn index( &self, idx: TypeComponentLocalErrorContextTableIndex, ) -> &TypeErrorContextTable
Performs the indexing (
container[index]) operation. Read moreSource§impl Index<TypeEnumIndex> for ComponentTypes
 
impl Index<TypeEnumIndex> for ComponentTypes
Source§impl Index<TypeFlagsIndex> for ComponentTypes
 
impl Index<TypeFlagsIndex> for ComponentTypes
Source§impl Index<TypeFuncIndex> for ComponentTypes
 
impl Index<TypeFuncIndex> for ComponentTypes
Source§impl Index<TypeFutureIndex> for ComponentTypes
 
impl Index<TypeFutureIndex> for ComponentTypes
Source§type Output = TypeFuture
 
type Output = TypeFuture
The returned type after indexing.
Source§fn index(&self, idx: TypeFutureIndex) -> &TypeFuture
 
fn index(&self, idx: TypeFutureIndex) -> &TypeFuture
Performs the indexing (
container[index]) operation. Read moreSource§impl Index<TypeFutureTableIndex> for ComponentTypes
 
impl Index<TypeFutureTableIndex> for ComponentTypes
Source§type Output = TypeFutureTable
 
type Output = TypeFutureTable
The returned type after indexing.
Source§fn index(&self, idx: TypeFutureTableIndex) -> &TypeFutureTable
 
fn index(&self, idx: TypeFutureTableIndex) -> &TypeFutureTable
Performs the indexing (
container[index]) operation. Read moreSource§impl Index<TypeListIndex> for ComponentTypes
 
impl Index<TypeListIndex> for ComponentTypes
Source§impl Index<TypeModuleIndex> for ComponentTypes
 
impl Index<TypeModuleIndex> for ComponentTypes
Source§type Output = TypeModule
 
type Output = TypeModule
The returned type after indexing.
Source§fn index(&self, idx: TypeModuleIndex) -> &TypeModule
 
fn index(&self, idx: TypeModuleIndex) -> &TypeModule
Performs the indexing (
container[index]) operation. Read moreSource§impl Index<TypeOptionIndex> for ComponentTypes
 
impl Index<TypeOptionIndex> for ComponentTypes
Source§type Output = TypeOption
 
type Output = TypeOption
The returned type after indexing.
Source§fn index(&self, idx: TypeOptionIndex) -> &TypeOption
 
fn index(&self, idx: TypeOptionIndex) -> &TypeOption
Performs the indexing (
container[index]) operation. Read moreSource§impl Index<TypeRecordIndex> for ComponentTypes
 
impl Index<TypeRecordIndex> for ComponentTypes
Source§type Output = TypeRecord
 
type Output = TypeRecord
The returned type after indexing.
Source§fn index(&self, idx: TypeRecordIndex) -> &TypeRecord
 
fn index(&self, idx: TypeRecordIndex) -> &TypeRecord
Performs the indexing (
container[index]) operation. Read moreSource§impl Index<TypeResourceTableIndex> for ComponentTypes
 
impl Index<TypeResourceTableIndex> for ComponentTypes
Source§type Output = TypeResourceTable
 
type Output = TypeResourceTable
The returned type after indexing.
Source§fn index(&self, idx: TypeResourceTableIndex) -> &TypeResourceTable
 
fn index(&self, idx: TypeResourceTableIndex) -> &TypeResourceTable
Performs the indexing (
container[index]) operation. Read moreSource§impl Index<TypeResultIndex> for ComponentTypes
 
impl Index<TypeResultIndex> for ComponentTypes
Source§type Output = TypeResult
 
type Output = TypeResult
The returned type after indexing.
Source§fn index(&self, idx: TypeResultIndex) -> &TypeResult
 
fn index(&self, idx: TypeResultIndex) -> &TypeResult
Performs the indexing (
container[index]) operation. Read moreSource§impl Index<TypeStreamIndex> for ComponentTypes
 
impl Index<TypeStreamIndex> for ComponentTypes
Source§type Output = TypeStream
 
type Output = TypeStream
The returned type after indexing.
Source§fn index(&self, idx: TypeStreamIndex) -> &TypeStream
 
fn index(&self, idx: TypeStreamIndex) -> &TypeStream
Performs the indexing (
container[index]) operation. Read moreSource§impl Index<TypeStreamTableIndex> for ComponentTypes
 
impl Index<TypeStreamTableIndex> for ComponentTypes
Source§type Output = TypeStreamTable
 
type Output = TypeStreamTable
The returned type after indexing.
Source§fn index(&self, idx: TypeStreamTableIndex) -> &TypeStreamTable
 
fn index(&self, idx: TypeStreamTableIndex) -> &TypeStreamTable
Performs the indexing (
container[index]) operation. Read moreSource§impl Index<TypeTupleIndex> for ComponentTypes
 
impl Index<TypeTupleIndex> for ComponentTypes
Source§impl Index<TypeVariantIndex> for ComponentTypes
 
impl Index<TypeVariantIndex> for ComponentTypes
Source§type Output = TypeVariant
 
type Output = TypeVariant
The returned type after indexing.
Source§fn index(&self, idx: TypeVariantIndex) -> &TypeVariant
 
fn index(&self, idx: TypeVariantIndex) -> &TypeVariant
Performs the indexing (
container[index]) operation. Read moreSource§impl Serialize for ComponentTypes
 
impl Serialize for ComponentTypes
Source§impl TypeTrace for ComponentTypes
 
impl TypeTrace for ComponentTypes
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 ComponentTypes
impl RefUnwindSafe for ComponentTypes
impl Send for ComponentTypes
impl Sync for ComponentTypes
impl Unpin for ComponentTypes
impl UnwindSafe for ComponentTypes
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