BSON_ITER_OVERWRITE_DOUBLE(3)

okay so this is BSON_ITER_OVERWRITE_DOUBLE(3), a libbson manual page, and honestly it's giving β€œsmall function, very specific job” energy πŸ’… Let's get into it.

✨ SYNOPSIS ✨

void
bson_iter_overwrite_double (bson_iter_t *iter, double value);

πŸŽ€ PARAMETERS πŸŽ€

  • iter β€” A bson_iter_t. Your iterator bestie 🫢
  • value β€” The new double value. The fresh number you're swapping in ✨

πŸ’– DESCRIPTION πŸ’–

The bson_iter_overwrite_double() function shall overwrite the contents of a BSON_TYPE_DOUBLE element in place. Like, in place in place β€” no copy, no clone, no little duplicate running around 🌸

This may only be done when the underlying bson document allows mutation. So before you go full main-character on it, make sure mutation is actually allowed, bestie πŸ‘‘

It is a programming error to call this function when iter is not observing an element of type BSON_TYPE_DOUBLE. That's not a cute little vibe-check fail β€” it's a programming error, so don't call it unless the iterator is literally observing a BSON_TYPE_DOUBLE element. Periodt πŸ’€

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc

2009-present, MongoDB, Inc.


signed off from the libbson 2.5.6 era, dated Oct 09, 2026 β€” slay and goodbye, bestie πŸ«ΆπŸ’–

πŸ“¦ where this page comes from