1BSON_ITER_BINARY(3)                 libbson                BSON_ITER_BINARY(3)
2
3
4

NAME

6       bson_iter_binary - bson_iter_binary()
7

SYNOPSIS

9          #define BSON_ITER_HOLDS_BINARY(iter) \
10             (bson_iter_type ((iter)) == BSON_TYPE_BINARY)
11
12          void
13          bson_iter_binary (const bson_iter_t *iter,
14                            bson_subtype_t *subtype,
15                            uint32_t *binary_len,
16                            const uint8_t **binary);
17

PARAMETERS

19iter: A bson_iter_t.
20
21subtype: A location for a bson_subtype_t or NULL.
22
23binary_len: A location for the length of binary.
24
25binary: A location for a pointer to the immutable buffer.
26

DESCRIPTION

28       This  function  shall return the binary data of a BSON_TYPE_BINARY ele‐
29       ment. It is a programming error to call this function on a  field  that
30       is   not  of  type  BSON_TYPE_BINARY.  You  can  check  this  with  the
31       BSON_ITER_HOLDS_BINARY() macro or bson_iter_type().
32
33       The buffer that binary points to is only  valid  until  the  iterator's
34       bson_t is modified or freed.
35

AUTHOR

37       MongoDB, Inc
38
40       2017-present, MongoDB, Inc
41
42
43
44
451.20.0                           Nov 18, 2021              BSON_ITER_BINARY(3)
Impressum