BSON_ITER_RECURSE(3)
π BSON_ITER_RECURSE π
okay so bestie, welcome to bson_iter_recurse(3) β that's the libbson manual page, and honestly? it's a little function that does a very big slay. let's get into it π
β¨ SYNOPSIS β¨
bool
bson_iter_recurse (const bson_iter_t *iter, bson_iter_t *child);
π«Ά PARAMETERS π«Ά
iterβ Abson_iter_t. yeah. that's the whole description. she's abson_iter_t, she iterates, she's iconic πchildβ Abson_iter_t. also just abson_iter_t. that's where the recurse lands, babes β¨
π¦ DESCRIPTION π¦
so bson_iter_recurse() shall initialize child using the embedded document or array that iter is currently observing. that's it. that's the vibe. you're standing on a document, and this function gives you your own little iterator to go wander around inside it πΈ
β οΈ but listen β if there was a failure to initialize the iter,falseis returned, and bothiterandchildshould be considered invalid. like, both of them. not just the baby one. don't go touching either of them after that, fr fr π
and this should only be called when you're observing an element of type BSON_TYPE_ARRAY or BSON_TYPE_DOCUMENT. no cap β those are the only two types where this makes any sense. anything else and you're just out here in the void π
β RETURNS β
if iter observes an element of type BSON_TYPE_ARRAY or BSON_TYPE_DOCUMENT, then child is initialized and the function returns true. yay! π slay! the vibe check passed β¨
otherwise, the function returns false and child is invalid. so like... don't use it. she's not ready. she needs a minute π
π AUTHOR π
MongoDB, Inc β the main characters themselves π
π COPYRIGHT π
2009-present, MongoDB, Inc.
okay that's the whole page bestie, go forth and recurse responsibly π§π
β with love from the libbson girlies, version 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