1BSON_INIT_STATIC(3)                 libbson                BSON_INIT_STATIC(3)
2
3
4

SYNOPSIS

6          bool
7          bson_init_static (bson_t *b, const uint8_t *data, size_t length);
8

PARAMETERS

10b: A bson_t.
11
12data: A buffer to initialize with.
13
14length: The length of data in bytes.
15

DESCRIPTION

17       The  bson_init_static()  function  shall  shall  initialize a read-only
18       bson_t on the stack using the data provided. No copies of the data will
19       be made and therefore must remain valid for the lifetime of the bson_t.
20
21       The  resulting bson_t has internal references and therefore must not be
22       copied to avoid dangling pointers in the copy.
23

RETURNS

25       Returns true if bson_t was successfully initialized,  otherwise  false.
26       The function can fail if data or length are invalid.
27

AUTHOR

29       MongoDB, Inc
30
32       2017-present, MongoDB, Inc
33
34
35
36
371.25.1                           Nov 08, 2023              BSON_INIT_STATIC(3)
Impressum