Wasmtime
component/val.h File Reference
#include <wasmtime/conf.h>

Go to the source code of this file.

Data Structures

struct  wasmtime_component_vallist
 A vec of a struct wasmtime_component_val
More...
 
struct  wasmtime_component_valrecord
 A vec of a struct wasmtime_component_valrecord_entry
More...
 
struct  wasmtime_component_valtuple
 A vec of a struct wasmtime_component_val
More...
 
struct  wasmtime_component_valflags
 A vec of a wasm_name_t
More...
 
struct  wasmtime_component_valvariant_t
 Represents a variant type. More...
 
struct  wasmtime_component_valresult_t
 Represents a result type. More...
 
union  wasmtime_component_valunion_t
 Represents possible runtime values which a component function can either consume or produce. More...
 
struct  wasmtime_component_val
 Represents possible runtime values which a component function can either consume or produce. More...
 
struct  wasmtime_component_valrecord_entry
 A pair of a name and a value that represents one entry in a value with kind WASMTIME_COMPONENT_RECORD. More...
 

Macros

#define WASMTIME_COMPONENT_BOOL   0
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a bool.
 
#define WASMTIME_COMPONENT_S8   1
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a s8.
 
#define WASMTIME_COMPONENT_U8   2
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a u8.
 
#define WASMTIME_COMPONENT_S16   3
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a s16.
 
#define WASMTIME_COMPONENT_U16   4
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a u16.
 
#define WASMTIME_COMPONENT_S32   5
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a s32.
 
#define WASMTIME_COMPONENT_U32   6
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a u32.
 
#define WASMTIME_COMPONENT_S64   7
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a s64.
 
#define WASMTIME_COMPONENT_U64   8
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a u64.
 
#define WASMTIME_COMPONENT_F32   9
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a f32.
 
#define WASMTIME_COMPONENT_F64   10
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a f64.
 
#define WASMTIME_COMPONENT_CHAR   11
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a char.
 
#define WASMTIME_COMPONENT_STRING   12
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a string.
 
#define WASMTIME_COMPONENT_LIST   13
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a list.
 
#define WASMTIME_COMPONENT_RECORD   14
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a record.
 
#define WASMTIME_COMPONENT_TUPLE   15
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a tuple.
 
#define WASMTIME_COMPONENT_VARIANT   16
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a variant.
 
#define WASMTIME_COMPONENT_ENUM   17
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a enum.
 
#define WASMTIME_COMPONENT_OPTION   18
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a option.
 
#define WASMTIME_COMPONENT_RESULT   19
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is a result.
 
#define WASMTIME_COMPONENT_FLAGS   20
 Value of wasmtime_component_valkind_t meaning that wasmtime_component_val_t is flags.
 

Typedefs

typedef uint8_t wasmtime_component_valkind_t
 Discriminant used in wasmtime_component_val_t::kind.
 
typedef struct wasmtime_component_vallist wasmtime_component_vallist_t
 A vec of a struct wasmtime_component_val

 
typedef struct wasmtime_component_valrecord wasmtime_component_valrecord_t
 A vec of a struct wasmtime_component_valrecord_entry

 
typedef struct wasmtime_component_valtuple wasmtime_component_valtuple_t
 A vec of a struct wasmtime_component_val

 
typedef struct wasmtime_component_valflags wasmtime_component_valflags_t
 A vec of a wasm_name_t

 
typedef struct wasmtime_component_val wasmtime_component_val_t
 Represents possible runtime values which a component function can either consume or produce.
 
typedef struct wasmtime_component_valrecord_entry wasmtime_component_valrecord_entry_t
 A pair of a name and a value that represents one entry in a value with kind WASMTIME_COMPONENT_RECORD.
 

Functions

WASM_API_EXTERN void wasmtime_component_vallist_new (wasmtime_component_vallist_t *out, size_t size, struct wasmtime_component_val *ptr)
 Create vec from ptr and size.
 
WASM_API_EXTERN void wasmtime_component_vallist_new_empty (wasmtime_component_vallist_t *out)
 Create an empty vec.
 
WASM_API_EXTERN void wasmtime_component_vallist_new_uninit (wasmtime_component_vallist_t *out, size_t size)
 Create a vec with length size.
 
WASM_API_EXTERN void wasmtime_component_vallist_copy (wasmtime_component_vallist_t *dst, const wasmtime_component_vallist_t *src)
 Copy src to dst.
 
WASM_API_EXTERN void wasmtime_component_vallist_delete (wasmtime_component_vallist_t *value)
 Delete value.
 
WASM_API_EXTERN void wasmtime_component_valrecord_new (wasmtime_component_valrecord_t *out, size_t size, struct wasmtime_component_valrecord_entry *ptr)
 Create vec from ptr and size.
 
WASM_API_EXTERN void wasmtime_component_valrecord_new_empty (wasmtime_component_valrecord_t *out)
 Create an empty vec.
 
WASM_API_EXTERN void wasmtime_component_valrecord_new_uninit (wasmtime_component_valrecord_t *out, size_t size)
 Create a vec with length size.
 
WASM_API_EXTERN void wasmtime_component_valrecord_copy (wasmtime_component_valrecord_t *dst, const wasmtime_component_valrecord_t *src)
 Copy src to dst.
 
WASM_API_EXTERN void wasmtime_component_valrecord_delete (wasmtime_component_valrecord_t *value)
 Delete value.
 
WASM_API_EXTERN void wasmtime_component_valtuple_new (wasmtime_component_valtuple_t *out, size_t size, struct wasmtime_component_val *ptr)
 Create vec from ptr and size.
 
WASM_API_EXTERN void wasmtime_component_valtuple_new_empty (wasmtime_component_valtuple_t *out)
 Create an empty vec.
 
WASM_API_EXTERN void wasmtime_component_valtuple_new_uninit (wasmtime_component_valtuple_t *out, size_t size)
 Create a vec with length size.
 
WASM_API_EXTERN void wasmtime_component_valtuple_copy (wasmtime_component_valtuple_t *dst, const wasmtime_component_valtuple_t *src)
 Copy src to dst.
 
WASM_API_EXTERN void wasmtime_component_valtuple_delete (wasmtime_component_valtuple_t *value)
 Delete value.
 
WASM_API_EXTERN void wasmtime_component_valflags_new (wasmtime_component_valflags_t *out, size_t size, wasm_name_t *ptr)
 Create vec from ptr and size.
 
WASM_API_EXTERN void wasmtime_component_valflags_new_empty (wasmtime_component_valflags_t *out)
 Create an empty vec.
 
WASM_API_EXTERN void wasmtime_component_valflags_new_uninit (wasmtime_component_valflags_t *out, size_t size)
 Create a vec with length size.
 
WASM_API_EXTERN void wasmtime_component_valflags_copy (wasmtime_component_valflags_t *dst, const wasmtime_component_valflags_t *src)
 Copy src to dst.
 
WASM_API_EXTERN void wasmtime_component_valflags_delete (wasmtime_component_valflags_t *value)
 Delete value.
 
WASM_API_EXTERN wasmtime_component_val_twasmtime_component_val_new ()
 Allocates a new wasmtime_component_val_t.
 
WASM_API_EXTERN void wasmtime_component_val_delete (wasmtime_component_val_t *value)
 Calls the destructor on value deallocating any owned memory.