1BSON_ITER_BINARY(3) libbson BSON_ITER_BINARY(3)
2
3
4
6 #define BSON_ITER_HOLDS_BINARY(iter) \
7 (bson_iter_type ((iter)) == BSON_TYPE_BINARY)
8
9 void
10 bson_iter_binary (const bson_iter_t *iter,
11 bson_subtype_t *subtype,
12 uint32_t *binary_len,
13 const uint8_t **binary);
14
16 • iter: A bson_iter_t.
17
18 • subtype: A location for a bson_subtype_t or NULL.
19
20 • binary_len: A location for the length of binary.
21
22 • binary: A location for a pointer to the immutable buffer.
23
25 This function shall return the binary data of a BSON_TYPE_BINARY ele‐
26 ment. It is a programming error to call this function on a field that
27 is not of type BSON_TYPE_BINARY. You can check this with the
28 BSON_ITER_HOLDS_BINARY() macro or bson_iter_type().
29
30 The buffer that binary points to is only valid until the iterator's
31 bson_t is modified or freed.
32
34 MongoDB, Inc
35
37 2017-present, MongoDB, Inc
38
39
40
41
421.25.1 Nov 08, 2023 BSON_ITER_BINARY(3)