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