BSON_ITER_INIT_FROM_DATA_AT_OFFSET(3) | libbson | BSON_ITER_INIT_FROM_DATA_AT_OFFSET(3) |
bson_iter_init_from_data_at_offset - bson_iter_init_from_data_at_offset()
bool bson_iter_init_from_data_at_offset (bson_iter_t *iter,
const uint8_t *data,
size_t length,
uint32_t offset,
uint32_t keylen);
Creates a bson_iter_t and starts iteration on a field at the offset.
bson_iter_init_from_data_at_offset is useful for situations where the progress of a bson_iter_t must be saved and restored without relying on the bson_iter_t data layout. Saving the progress could be accomplished by:
Then later, these saved values can be passed to bson_iter_init_from_data_at_offset() to reconstruct the bson_iter_t in constant time.
Returns true if the iter was successfully initialized.
MongoDB, Inc
2017-present, MongoDB, Inc
June 4, 2021 | 1.17.6 |