BSON_ITER_BINARY_SUBTYPE(3)
π BSON_ITER_BINARY_SUBTYPE(3) π
okay so bestie, welcome to libbson's very own bson_iter_binary_subtype page β yes that's a mouthful, no we're not changing it, the C people decided β¨
πΈ SYNOPSIS πΈ
bson_subtype_t
bson_iter_binary (const bson_iter_t *iter);
wait. not me almost typos the function name π it's actually:
bson_subtype_t
bson_iter_binary_subtype (const bson_iter_t *iter);
like, literally copy it exactly, the compiler is not forgiving and neither is the linker π
π PARAMETERS π
iterβ abson_iter_t. that's it. that's the whole parameter list. one (1) iterator, she's the main character π«Ά
π¦ DESCRIPTION π¦
so the way this works: this function shall return the subtype of a BSON_TYPE_BINARY element. that's her whole job, she's an icon, she does one thing and she slays at it π
now for the vibe check β οΈ β it is a programming error to call this function on a field that is not of type BSON_TYPE_BINARY. like, not "oopsie" error, not "warn you gently" error, we're talking you did this to yourself error. check first, babes, always check first π
you can check with the BSON_ITER_HOLDS_BINARY() macro, or lowkey with bson_iter_type() if that's more your vibe. both work, pick your fighter π
and fyi, this function is equivalent to the subtype output parameter of bson_iter_binary() β same info, just served directly to you instead of through the out-param. convenient? yes. iconic? also yes π
π AUTHOR π
MongoDB, Inc β yeah, the database people, doing the most as usual π
π COPYRIGHT π
2009-present, MongoDB, Inc. β long run, no cap, they've been at this since 2009 and they're still going π₯
real talk though bestie: type-check with BSON_ITER_HOLDS_BINARY() before you call her. it's giving self-care, it's giving not-crashing-at-3am, it's giving responsible C programmer energy π§
and that's the page!! mwah π this cutie came to you from libbson 2.5.6, dated Oct 09, 2026 β screenshot it, frame it, put it on your fridge, BSON_ITER_BINARY_SUBTYPE(3) forever βπ periodt πβ
π¦ 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