Wasmtime
wasmtime::component::ComponentItem Class Reference

Represents a single item in a component's import or export list. More...

#include <component.hh>

Public Member Functions

 ComponentItem (wasmtime_component_item_t &&item)
 Creates a component item from the raw C API representation.
 
 ComponentItem (const ComponentItem &other)
 Copies another item into this one.
 
ComponentItemoperator= (const ComponentItem &other)
 Copies another item into this one.
 
 ComponentItem (ComponentItem &&other)
 Moves another item into this one.
 
ComponentItemoperator= (ComponentItem &&other)
 Moves another item into this one.
 
bool is_component () const
 Returns true if this is a component.
 
bool is_component_instance () const
 Returns true if this is a component instance.
 
bool is_module () const
 Returns true if this is a module.
 
bool is_component_func () const
 Returns true if this is a component function.
 
bool is_resource () const
 Returns true if this is a resource.
 
bool is_core_func () const
 Returns true if this is a core function.
 
bool is_type () const
 Returns true if this is a type.
 
const ComponentTypecomponent () const
 
const ComponentInstanceTypecomponent_instance () const
 
const ModuleTypemodule () const
 
const FuncTypecomponent_func () const
 
const ResourceTyperesource () const
 
wasmtime::FuncType::Ref core_func () const
 
const ValTypetype () const
 

Detailed Description

Represents a single item in a component's import or export list.

Member Function Documentation

◆ component()

const ComponentType & wasmtime::component::ComponentItem::component ( ) const
inline

Returns the component type this item represents, asserting that this is indeed a component.

◆ component_func()

const wasmtime::component::FuncType & wasmtime::component::ComponentItem::component_func ( ) const
inline

Returns the component function type this item represents, asserting that this is indeed a component function.

◆ component_instance()

const wasmtime::component::ComponentInstanceType & wasmtime::component::ComponentItem::component_instance ( ) const
inline

Returns the component instance type this item represents, asserting that this is indeed a component instance.

◆ core_func()

wasmtime::FuncType::Ref wasmtime::component::ComponentItem::core_func ( ) const
inline

Returns the core function type this item represents, asserting that this is indeed a core function.

◆ module()

const wasmtime::component::ModuleType & wasmtime::component::ComponentItem::module ( ) const
inline

Returns the module type this item represents, asserting that this is indeed a module.

◆ resource()

const wasmtime::component::ResourceType & wasmtime::component::ComponentItem::resource ( ) const
inline

Returns the resource type this item represents, asserting that this is indeed a resource.

◆ type()

const wasmtime::component::ValType & wasmtime::component::ComponentItem::type ( ) const
inline

Returns the type this item represents, asserting that this is indeed a type.


The documentation for this class was generated from the following file: