Function tarantool_rust_module::box_tuple_iterator
[−]
[src]
pub unsafe extern "C" fn box_tuple_iterator(
tuple: *mut BoxTuple
) -> *mut BoxTupleIterator
Allocate and initialize a new tuple iterator. The tuple iterator allow to iterate over fields at root level of MsgPack array.
Example: \code box_tuple_iterator *it = box_tuple_iterator(tuple); if (it == NULL) { // error handling using box_error_last() } const char *field; while (field = box_tuple_next(it)) { // process raw MsgPack data }
// rewind iterator to first position box_tuple_rewind(it); assert(box_tuple_position(it) == 0);
// rewind iterator to first position field = box_tuple_seek(it, 3); assert(box_tuple_position(it) == 4);
box_iterator_free(it); \endcode
\post box_tuple_position(it) == 0