BSON_VECTOR_IN..._VIEW_FROM_ITER(3)

πŸ“¦
version 2.5.6 Β· 3 versions
, in epel 10

πŸ’… BSON_VECTOR_IN..._VIEW_FROM_ITER(3) β€” the libbson one, bestie

ok so picture this: it's a bson_vector_int8_const_view_t glow-up moment. This function takes an iterator that's already pointing at a legit Vector of int8 element type and spins you up a const view of it. That's the whole vibe. ✨


🌸 SYNOPSIS 🌸

bool
bson_vector_int8_const_view_from_iter (bson_vector_int8_const_view_t *view_out,
                                       const bson_iter_t *iter);

πŸŽ€ PARAMETERS πŸŽ€

  • view_out β€” a bson_vector_int8_const_view_t gets written right here when things go well. bestie gets a home 🫢
  • iter β€” a valid bson_iter_t. that's it, that's the requirement.

πŸ¦‹ DESCRIPTION πŸ¦‹

So the iterator you hand over has to point to some kind of BSON item β€” literally any kind β€” and we're gonna run a vibe check on it to see if it's a valid Vector of int8 element type. iykyk πŸ‘‘

If the check passes, the bson_vector_int8_const_view_t gets set to point to the same underlying bson_t buffer as the bson_iter_t you gave us. Same buffer, no copies, we're just looking respectfully. πŸ’…

⚠️ huge caveat, do not skip: the view is only valid until the containing document is destroyed or modified. after that it's giving expired milk. 😭

⭐ RETURNS ⭐

Returns true if the view was successfully initialized. false means nope, not today. πŸ™ˆ


πŸ”Ž SEE ALSO πŸ”Ž

  • bson_vector_int8_view_from_iter() β€” the non-const sibling, the main character of the other page 🌈

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc


2009-present, MongoDB, Inc.


okay that's the whole page, no cap β€” written by me, for libbson version 2.5.6, dated Oct 09 (the year got cut off in the footer, tragic, but that's what it says πŸ’€). go forth and view those vectors, bestie. πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from