doc buf
doc len
pointer to error code
ErrorCode
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);
Get document error code