BSON_ITER_OVERWRITE_BINARY(3)
π BSON_ITER_OVERWRITE_BINARY(3) β libbson, but make it group chat π
okay so bestie, this is the BSON_ITER_OVERWRITE_BINARY(3) page from libbson, and it's giving βI have direct, in-place access to a binary fieldβ energy. No cap. π
β¨ SYNOPSIS β¨
void
bson_iter_overwrite_binary (bson_iter_t *iter,
bson_subtype_t subtype,
uint32_t *binary_len,
uint8_t **binary);
π PARAMETERS π
iterβ abson_iter_t. The iterator bestie in question. π«Άsubtypeβ the expectedbson_subtype_t.binary_lenβ a location for the length ofbinary.binaryβ a location for a pointer to the mutable buffer.
π¦ DESCRIPTION π¦
The bson_iter_overwrite_binary() function obtains mutable access to a BSON_TYPE_BINARY element in place. In-place access, literally. β¨
This may only be done when the underlying bson document allows mutation. So yeah β mutation permission is the vibe check here. π
It is a programming error to call this function wheniteris not observing an element of typeBSON_TYPE_BINARYand the providedsubtype. Like, actual programming error, not a cute little oopsie. π
The buffer that binary points to is only valid until the iterator's bson_t is otherwise modified or freed. So that pointer has a shelf life, bestie β that's the whole window. π°οΈ
π SEE ALSO: π
bson_iter_binary()
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
bye bestie β this page is from libbson 2.5.6, dated Oct 09, 2026 πβ¨
π¦ where this page comes from
- epel 10: libbson-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms