utils/yaml.h file

YAML utils.

Contents

Functions

auto yaml_serialize(void* data, const cyaml_schema_value_t* schema) -> NONNULL char*
Serializes to YAML.
void yaml_cyaml_log_func(cyaml_log_t level, void* ctxt, const char* format, va_list args)
Custom logging function for libcyaml.

Defines

#define YAML_FIELD_MAPPING_EMBEDDED(owner, member, schema)
Mapping embedded inside the struct.
#define YAML_FIELD_MAPPING_PTR(owner, member, schema)
Mapping pointer to a struct.
#define YAML_FIELD_MAPPING_PTR_OPTIONAL(owner, member, schema)
Mapping pointer to a struct.
#define YAML_FIELD_FIXED_SIZE_PTR_ARRAY_VAR_COUNT(owner, member, schema)
Fixed-width array of pointers with variable count.
#define YAML_FIELD_FIXED_SIZE_PTR_ARRAY(owner, member, schema, size)
Fixed-width array of pointers with fixed count.
#define YAML_FIELD_DYN_PTR_ARRAY_VAR_COUNT(owner, member, schema)
Dynamic-width (reallocated) array of pointers with variable count.
#define YAML_FIELD_DYN_FIXED_SIZE_PTR_ARRAY(owner, member, schema, fixed_size)
Dynamic (allocated) array of pointers with fixed count.
#define YAML_FIELD_DYN_ARRAY_VAR_COUNT(owner, member, schema)
Dynamic-width (reallocated) array of structs with variable count.
#define YAML_FIELD_DYN_PTR_ARRAY_VAR_COUNT_OPT(owner, member, schema)
Dynamic-width (reallocated) array of pointers with variable count, nullable.
#define YAML_FIELD_DYN_FIXED_SIZE_PTR_ARRAY_OPT(owner, member, schema, fixed_size)
Dynamic (allocated) array of pointers with fixed count.
#define YAML_FIELD_DYN_ARRAY_VAR_COUNT_PRIMITIVES(owner, member, schema)
Dynamic-width (reallocated) array of primitives with variable count.
#define YAML_FIELD_SEQUENCE_FIXED(owner, member, schema, size)
Fixed sequence of pointers.
#define YAML_VALUE_PTR(cc, fields_schema)
Schema to be used as a pointer.
#define YAML_VALUE_PTR_NULLABLE(cc, fields_schema)
Schema to be used as a pointer that can be NULL.
#define YAML_VALUE_DEFAULT(cc, fields_schema)
Schema to be used for arrays of structs directly (not as pointers).