Wasmtime
wasmtime::component::Tuple Class Reference

Class representing a component model tuple. More...

#include <val.hh>

Public Member Functions

 Tuple (Raw &&capi)
 
 Tuple (const Tuple &other)
 Copy constructor to clone other.
More...
 
Tuple & operator= (const Tuple &other)
 Copy assignment to clone from other.
More...
 
 Tuple (Tuple &&other)
 Move constructor to move the contents of other.
More...
 
Tuple & operator= (Tuple &&other)
 Move assignment to move the contents of other.
More...
 
const Raw * capi () const
 Returns a pointer to the underlying C API representation.
More...
 
 Tuple (std::vector< Val > entries)
 Creates a new tuple from the named field pairs provided.
 
size_t size () const
 Returns the number of entries in the tuple.
 
const Val * begin () const
 Returns an iterator to the beginning of the tuple.
 
const Val * end () const
 Returns an iterator to the end of the tuple.
 

Static Public Member Functions

static const Tuple * from_capi (const Raw *capi)
 
static Tuple * from_capi (Raw *capi)
 
static const Raw * to_capi (const Tuple *capi)
 
static Raw * to_capi (Tuple *capi)
 

Friends

class Val
 

Detailed Description

Class representing a component model tuple.

Constructor & Destructor Documentation

◆ Tuple() [1/3]

wasmtime::component::Tuple::Tuple ( Raw &&  capi)
inlineexplicit
  • Create a variant that takes ownership of the underlying C API variant.

◆ Tuple() [2/3]

wasmtime::component::Tuple::Tuple ( const Tuple &  other)
inline

Copy constructor to clone other.

◆ Tuple() [3/3]

wasmtime::component::Tuple::Tuple ( Tuple &&  other)
inline

Move constructor to move the contents of other.

Member Function Documentation

◆ capi()

const Raw * wasmtime::component::Tuple::capi ( ) const
inline

Returns a pointer to the underlying C API representation.

◆ from_capi() [1/2]

static const Tuple * wasmtime::component::Tuple::from_capi ( const Raw *  capi)
inlinestatic
  • Converts the raw C API representation to this class without taking * ownership.

◆ from_capi() [2/2]

static Tuple * wasmtime::component::Tuple::from_capi ( Raw *  capi)
inlinestatic
  • Converts the raw C API representation to this class without taking * ownership.

◆ operator=() [1/2]

Tuple & wasmtime::component::Tuple::operator= ( const Tuple &  other)
inline

Copy assignment to clone from other.

◆ operator=() [2/2]

Tuple & wasmtime::component::Tuple::operator= ( Tuple &&  other)
inline

Move assignment to move the contents of other.

◆ to_capi() [1/2]

static const Raw * wasmtime::component::Tuple::to_capi ( const Tuple *  capi)
inlinestatic
  • Converts to the raw C API representation to this class without taking * ownership.

◆ to_capi() [2/2]

static Raw * wasmtime::component::Tuple::to_capi ( Tuple *  capi)
inlinestatic
  • Converts to the raw C API representation to this class without taking * ownership.

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