BSON_ITER_TYPE(3)
β¨ BSON_ITER_TYPE β¨
okay bestie, so this is a libbson page, and honestly it's giving "short but iconic" π
like yes it's just one function but we're gonna learn it properly, no cap.
πΈ SYNOPSIS πΈ
so first things first, here's the whole bson_type_t enum in all its glory β every single value, exactly as it lives, don't come for me about the hex, it's all right here:
typedef enum {
BSON_TYPE_EOD = 0x00,
BSON_TYPE_DOUBLE = 0x01,
BSON_TYPE_UTF8 = 0x02,
BSON_TYPE_DOCUMENT = 0x03,
BSON_TYPE_ARRAY = 0x04,
BSON_TYPE_BINARY = 0x05,
BSON_TYPE_UNDEFINED = 0x06,
BSON_TYPE_OID = 0x07,
BSON_TYPE_BOOL = 0x08,
BSON_TYPE_DATE_TIME = 0x09,
BSON_TYPE_NULL = 0x0A,
BSON_TYPE_REGEX = 0x0B,
BSON_TYPE_DBPOINTER = 0x0C,
BSON_TYPE_CODE = 0x0D,
BSON_TYPE_SYMBOL = 0x0E,
BSON_TYPE_CODEWSCOPE = 0x0F,
BSON_TYPE_INT32 = 0x10,
BSON_TYPE_TIMESTAMP = 0x11,
BSON_TYPE_INT64 = 0x12,
BSON_TYPE_MAXKEY = 0x7F,
BSON_TYPE_MINKEY = 0xFF,
} bson_type_t;
and then the actual star of the show, the function signature π«Ά:
bson_type_t
bson_iter_type (const bson_iter_t *iter);
π PARAMETERS π
iterβ abson_iter_t. that's it. that's the whole parameter list bestie, she's low maintenance π
π¦ DESCRIPTION π¦
so the bson_iter_type() function shall return the type of the observed element in a bson document. literally that's the whole vibe β you hand it an iterator, it tells you what kind of thing you're looking at. type check slay β¨
β RETURNS β
a bson_type_t. one of the little hex-coded cuties from the enum above π no surprises here.
π AUTHOR π
MongoDB, Inc β the icons behind all of this, we stan π«Ά
π COPYRIGHT π
2009-present, MongoDB, Inc. protecting the work fr fr π
okay that's the whole page bestie, go forth and type-check your BSON elements, you're gonna eat this up π₯
signing off from libbson version 2.5.6, dated Oct 09, 2026 β catch you in the next manpage, mwah π
π¦ 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