40 struct as_rec_hooks_s;
65 typedef struct as_rec_s {
82 const struct as_rec_hooks_s *
hooks;
92 typedef struct as_rec_hooks_s {
102 uint32_t (* hashcode)(
const as_rec * rec);
112 int (* set)(
const as_rec * rec,
const char * name,
const as_val * value);
117 int (*
remove)(
const as_rec * rec,
const char * bin);
132 uint16_t (* numbins)(
const as_rec * rec);
142 int (* set_flags)(
const as_rec * rec,
const char * bin, uint8_t flags);
147 int (* set_type)(
const as_rec * rec, uint8_t type);
221 return rec ? rec->
data : NULL;
581 return as_util_hook(
foreach,
false, rec, callback, udata);
int as_rec_remove(const as_rec *rec, const char *name)
int64_t as_rec_get_int64(const as_rec *rec, const char *name)
as_bytes * as_bytes_fromval(const as_val *v)
as_rec * as_rec_cons(as_rec *rec, bool free, void *data, const as_rec_hooks *hooks)
uint32_t as_rec_val_hashcode(const as_val *v)
bool(* as_rec_foreach_callback)(const char *name, const as_val *value, void *udata)
as_string * as_string_new(char *value, bool free)
as_rec * as_rec_init(as_rec *rec, void *data, const as_rec_hooks *hooks)
#define as_util_fromval(object, type_id, type)
char * as_rec_get_str(const as_rec *rec, const char *name)
as_val * as_rec_get(const as_rec *rec, const char *name)
int as_rec_set(const as_rec *rec, const char *name, const as_val *value)
as_val * as_rec_toval(const as_rec *rec)
char * as_string_tostring(const as_string *string)
as_integer * as_integer_new(int64_t value)
uint16_t as_rec_numbins(const as_rec *rec)
as_rec * as_rec_fromval(const as_val *v)
void as_rec_val_destroy(as_val *)
as_string * as_string_fromval(const as_val *v)
uint32_t as_rec_ttl(const as_rec *rec)
#define as_util_hook(hook, default, object, args...)
int as_rec_set_bytes(const as_rec *rec, const char *name, const as_bytes *value)
as_bytes * as_rec_get_bytes(const as_rec *rec, const char *name)
as_integer * as_integer_fromval(const as_val *v)
int64_t as_integer_toint(const as_integer *integer)
uint16_t as_rec_gen(const as_rec *rec)
int as_rec_set_list(const as_rec *rec, const char *name, const as_list *value)
as_list * as_rec_get_list(const as_rec *rec, const char *name)
as_bytes * as_rec_digest(const as_rec *rec)
bool as_rec_foreach(const as_rec *rec, as_rec_foreach_callback callback, void *udata)
as_map * as_map_fromval(const as_val *val)
int as_rec_set_str(const as_rec *rec, const char *name, const char *value)
int as_rec_set_map(const as_rec *rec, const char *name, const as_map *value)
int as_rec_set_flags(const as_rec *rec, const char *name, uint8_t flags)
as_string * as_rec_get_string(const as_rec *rec, const char *name)
struct as_rec_hooks_s * hooks
as_list * as_list_fromval(as_val *v)
#define as_val_destroy(__v)
as_integer * as_rec_get_integer(const as_rec *rec, const char *name)
char * as_rec_val_tostring(const as_val *v)
as_map * as_rec_get_map(const as_rec *rec, const char *name)
void as_rec_destroy(as_rec *rec)
int as_rec_set_type(const as_rec *rec, uint8_t rec_type)
int as_rec_set_int64(const as_rec *rec, const char *name, int64_t value)
int as_rec_set_integer(const as_rec *rec, const char *name, const as_integer *value)
void * as_rec_source(const as_rec *rec)
as_rec * as_rec_new(void *data, const as_rec_hooks *hooks)
int as_rec_set_string(const as_rec *rec, const char *name, const as_string *value)