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 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<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<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<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 moreAuto 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