tagion_document_valid

Get document error code

extern (C)
int
tagion_document_valid
(
const uint8_t* buf
,
const size_t buf_len
,)

Parameters

buf uint8_t*

doc buf

buf_len size_t

doc len

doc_error_code int32_t*

pointer to error code

Return Value

Type: int

ErrorCode

Examples

auto h = new HiBON;
h["good"] = "document";
const doc = Document(h);

int doc_error_code = 7;
int rt = tagion_document_valid(&doc.data[0], doc.data.length, &doc_error_code);
assert(rt == ErrorCode.none);
assert(doc_error_code == Document.Element.ErrorCode.NONE);