HiBONT instance
the returned buf ptr
length of the buf
ErrorCode
todoc
HiBONT h; int rt = tagion_hibon_create(&h); assert(rt == ErrorCode.none, "could not create hibon"); string key = "some_key"; string value = "some_value"; rt = tagion_hibon_add_string(&h, &key[0], key.length, &value[0], value.length); HiBON string_hibon = cast(HiBON) h.hibon; const doc = Document(string_hibon); uint8_t* buf; size_t buf_len; rt = tagion_hibon_get_document(&h, &buf, &buf_len); assert(rt == ErrorCode.none); auto read_data = cast(immutable) buf[0..buf_len]; assert(doc == Document(read_data));
Convert a hibon to a document