BSON_ITER_AS_INT64(3)

πŸ’… BSON_ITER_AS_INT64 πŸ’…

okay so bestie, welcome to the libbson corner of the manual-verse β€” this one's about bson_iter_as_int64 and honestly it's giving "tiny function, very useful, knows exactly what it is" ✨


✨ SYNOPSIS ✨

int64_t
bson_iter_as_int64 (const bson_iter_t *iter);

πŸŽ€ PARAMETERS πŸŽ€

  • iter β€” a bson_iter_t. that's it. that's the whole param list. she's low maintenance 🫢

🌸 DESCRIPTION 🌸

bson_iter_as_int64() shall return the contents of the current element as if it were a BSON_TYPE_INT64 element β€” like, it just pretends for a sec, but respectfully, and only for the types it actually supports. no cap πŸ’…

the currently supported casts include:

  • BSON_TYPE_BOOL
  • BSON_TYPE_DOUBLE
  • BSON_TYPE_INT32
  • BSON_TYPE_INT64

so if your element is any of those four, she'll hand you back an int64. icon behaviour, honestly πŸ‘‘


🌈 RETURNS 🌈

a 64-bit signed integer. that's the vibe check result: int64_t, signed, 64 whole bits of it ⭐


πŸ¦‹ AUTHOR πŸ¦‹

MongoDB, Inc


2009-present, MongoDB, Inc.


and that's a wrap, bestie 🧚 this page came to you courtesy of libbson β€” version 2.5.6, dated Oct 09, 2026. go forth and cast responsibly πŸ’œπŸŽ€

πŸ“¦ where this page comes from