Wasmtime
wasmtime::component::List Class Reference

Class representing a component model list, a sequence of values. More...

#include <val.hh>

Public Member Functions

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

Static Public Member Functions

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

Friends

class Val
 

Detailed Description

Class representing a component model list, a sequence of values.

Constructor & Destructor Documentation

◆ List() [1/3]

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

◆ List() [2/3]

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

Copy constructor to clone other.

◆ List() [3/3]

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

Move constructor to move the contents of other.

Member Function Documentation

◆ capi()

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

Returns a pointer to the underlying C API representation.

◆ from_capi() [1/2]

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

◆ from_capi() [2/2]

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

◆ operator=() [1/2]

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

Copy assignment to clone from other.

◆ operator=() [2/2]

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

Move assignment to move the contents of other.

◆ to_capi() [1/2]

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

◆ to_capi() [2/2]

static Raw * wasmtime::component::List::to_capi ( List *  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: