pub struct Types { /* private fields */ }
validate
only.Expand description
Represents the types known to a crate::Validator
once validation has completed.
The type information is returned via the crate::Validator::end
method.
Implementations§
Source§impl Types
impl Types
Sourcepub fn component_any_type_at(&self, index: u32) -> ComponentAnyTypeId
Available on crate feature component-model
only.
pub fn component_any_type_at(&self, index: u32) -> ComponentAnyTypeId
component-model
only.Gets a component WebAssembly type at the given type index.
Note that this is in contrast to TypesRef::core_type_at_in_component
which gets a core type from its index.
§Panics
Panics if index
is not a valid type index.
Sourcepub fn component_type_at(&self, index: u32) -> ComponentTypeId
Available on crate feature component-model
only.
pub fn component_type_at(&self, index: u32) -> ComponentTypeId
component-model
only.Gets a component type at the given type index.
§Panics
Panics if index
is not a valid component type index.
Sourcepub fn component_defined_type_at(&self, index: u32) -> ComponentDefinedTypeId
Available on crate feature component-model
only.
pub fn component_defined_type_at(&self, index: u32) -> ComponentDefinedTypeId
component-model
only.Gets a component type from the given component type index.
§Panics
Panics if index
is not a valid defined type index or if this type
information represents a core module.
Sourcepub fn component_function_at(&self, index: u32) -> ComponentFuncTypeId
Available on crate feature component-model
only.
pub fn component_function_at(&self, index: u32) -> ComponentFuncTypeId
component-model
only.Gets the type of a component function at the given function index.
§Panics
This will panic if the index
provided is out of bounds or if this type
information represents a core module.
Sourcepub fn component_function_count(&self) -> u32
Available on crate feature component-model
only.
pub fn component_function_count(&self) -> u32
component-model
only.Gets the count of imported, exported, or aliased component functions.
Sourcepub fn module_at(&self, index: u32) -> ComponentCoreModuleTypeId
Available on crate feature component-model
only.
pub fn module_at(&self, index: u32) -> ComponentCoreModuleTypeId
component-model
only.Gets the type of a module at the given module index.
§Panics
This will panic if the index
provided is out of bounds or if this type
information represents a core module.
Sourcepub fn module_count(&self) -> usize
Available on crate feature component-model
only.
pub fn module_count(&self) -> usize
component-model
only.Gets the count of imported, exported, or aliased modules.
Sourcepub fn core_instance_at(&self, index: u32) -> ComponentCoreInstanceTypeId
Available on crate feature component-model
only.
pub fn core_instance_at(&self, index: u32) -> ComponentCoreInstanceTypeId
component-model
only.Gets the type of a module instance at the given module instance index.
§Panics
This will panic if the index
provided is out of bounds or if this type
information represents a core module.
Sourcepub fn core_instance_count(&self) -> usize
Available on crate feature component-model
only.
pub fn core_instance_count(&self) -> usize
component-model
only.Gets the count of imported, exported, or aliased core module instances.
Sourcepub fn component_at(&self, index: u32) -> ComponentTypeId
Available on crate feature component-model
only.
pub fn component_at(&self, index: u32) -> ComponentTypeId
component-model
only.Gets the type of a component at the given component index.
§Panics
This will panic if the index
provided is out of bounds or if this type
information represents a core module.
Sourcepub fn component_count(&self) -> usize
Available on crate feature component-model
only.
pub fn component_count(&self) -> usize
component-model
only.Gets the count of imported, exported, or aliased components.
Sourcepub fn component_instance_at(&self, index: u32) -> ComponentInstanceTypeId
Available on crate feature component-model
only.
pub fn component_instance_at(&self, index: u32) -> ComponentInstanceTypeId
component-model
only.Gets the type of an component instance at the given component instance index.
§Panics
This will panic if the index
provided is out of bounds or if this type
information represents a core module.
Sourcepub fn component_instance_count(&self) -> usize
Available on crate feature component-model
only.
pub fn component_instance_count(&self) -> usize
component-model
only.Gets the count of imported, exported, or aliased component instances.
Sourcepub fn value_at(&self, index: u32) -> ComponentValType
Available on crate feature component-model
only.
pub fn value_at(&self, index: u32) -> ComponentValType
component-model
only.Gets the type of a value at the given value index.
§Panics
This will panic if the index
provided is out of bounds or if this type
information represents a core module.
Sourcepub fn value_count(&self) -> usize
Available on crate feature component-model
only.
pub fn value_count(&self) -> usize
component-model
only.Gets the count of imported, exported, or aliased values.
Sourcepub fn component_entity_type_of_import(
&self,
name: &str,
) -> Option<ComponentEntityType>
Available on crate feature component-model
only.
pub fn component_entity_type_of_import( &self, name: &str, ) -> Option<ComponentEntityType>
component-model
only.Gets the component entity type for the given component import name.
Sourcepub fn component_entity_type_of_export(
&self,
name: &str,
) -> Option<ComponentEntityType>
Available on crate feature component-model
only.
pub fn component_entity_type_of_export( &self, name: &str, ) -> Option<ComponentEntityType>
component-model
only.Gets the component entity type for the given component export name.
Sourcepub fn peel_alias<T>(&self, ty: T) -> Option<T>where
T: Aliasable,
Available on crate feature component-model
only.
pub fn peel_alias<T>(&self, ty: T) -> Option<T>where
T: Aliasable,
component-model
only.Attempts to lookup the type id that ty
is an alias of.
Returns None
if ty
wasn’t listed as aliasing a prior type.