BSON_ITER_OVERWRITE_BOOL(3)

πŸ’… BSON_ITER_OVERWRITE_BOOL(3) πŸ’…

okay so bestie, welcome to libbson β€” this is the BSON_ITER_OVERWRITE_BOOL(3) page and it's literally about swapping out a boolean without breaking a sweat. no cap. ✨


✨ SYNOPSIS ✨

void
bson_iter_overwrite_bool (bson_iter_t *iter, bool value);

that's it. that's the whole vibe. two arguments, no return value, absolutely zero drama. πŸŽ€


🌸 PARAMETERS 🌸

  • iter β€” a bson_iter_t. your iterator girlie, the one pointing at the thing you wanna change. πŸ‘€
  • value β€” a bool holding the new value. the glow-up you're giving it, fr fr.

πŸ¦‹ DESCRIPTION πŸ¦‹

the bson_iter_overwrite_bool() function shall overwrite the contents of a BSON_TYPE_BOOL element in place. like, no copying, no new document, just a little surgical slay right where it sits. πŸ”₯

⚠️ but listen β€” this may only be done when the underlying bson document allows mutation. if it doesn't, that's a whole situation, so check first bestie. πŸ™ˆ

and it is a programming error to call this function when iter is not observing an element of type BSON_TYPE_BOOL. not a warning, not a suggestion β€” a programming error. the iterator has to actually be looking at a bool. anything else and you're cooked. πŸ’€


πŸ’œ AUTHOR πŸ’œ

MongoDB, Inc β€” iconic behavior honestly πŸ‘‘


2009-present, MongoDB, Inc.


and that's the whole page babes πŸ’– version 2.5.6, dated Oct 09, 2026, brought to you by the fine folks at MongoDB, Inc. go forth and overwrite responsibly β€” and remember: bool only, mutation allowed, no exceptions 🫢✨

πŸ“¦ where this page comes from