pub struct Types { /* private fields */ }
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

Gets a type based on its type id.

Returns None if the type id is unknown.

Gets a type id from a type index.

Returns None if the type index is out of bounds.

Gets a defined type at the given type index.

Returns None if the index is out of bounds.

Gets a defined core function type at the given type index.

Returns None if the index is out of bounds.

Additionally, this method always returns None for components because core function types are never present in a component’s type index space.

Gets the count of defined types.

Gets the type of a table at the given table index.

Returns None if the index is out of bounds.

Gets the count of imported and defined tables.

Gets the type of a memory at the given memory index.

Returns None if the index is out of bounds.

Gets the count of imported and defined memories.

Gets the type of a global at the given global index.

Returns None if the index is out of bounds.

Gets the count of imported and defined globals.

Gets the type of a tag at the given tag index.

Returns None if the index is out of bounds.

Gets the count of imported and defined tags.

Gets the type of a core function at the given function index.

Returns None if the index is out of bounds or when parsing a component and the function at the given index is not a core function type.

Gets the type of a component function at the given function index.

Returns None if the index is out of bounds or if the function at the given index is not a component function type.

Gets the count of imported and defined functions.

The count also includes aliased functions in components.

Gets the type of an element segment at the given element segment index.

Returns None if the index is out of bounds.

Gets the count of element segments.

Gets the type of a module at the given module index.

Returns None if the index is out of bounds.

Gets the count of imported, exported, or aliased modules.

Gets the type of a component at the given component index.

Returns None if the index is out of bounds.

Gets the count of imported, exported, or aliased components.

Gets the type of an instance at the given instance index.

Returns None if the index is out of bounds or if the instance is not a component instance.

Gets the type of a core module instance at the given instance index.

Returns None if the index is out of bounds or if the instance is not a module instance.

Gets the count of imported, exported, or aliased instances.

Gets the type of a value at the given value index.

Returns None if the index is out of bounds.

Gets the count of imported, exported, or aliased values.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.