BSON_VECTOR_FLOAT32_VIEW_T(3)
π BSON_VECTOR_FLOAT32_VIEW_T(3) π
okay so this is a page from the libbson manual, and bestie, it's literally a whole vibe β it's a reference to mutable, non-owned BSON Binary data that's holding a valid Vector of float32 element type. no cap. π¦
β¨ NAME β¨
bson_vector_float32_view_t β a reference to mutable non-owned BSON Binary data holding a valid Vector of float32 element type π
πΈ SYNOPSIS πΈ
#include <bson/bson.h>
typedef struct bson_vector_float32_view_t {
/*< private >*/
} bson_vector_float32_view_t;
π DESCRIPTION π
so bson_vector_float32_view_t is a structure that lowkey acts as an opaque reference to a block of memory that has been validated as a float32 vector. it's giving "trust me, i checked" energy. β¨
the way it's meant to be handled: pass it by value, and honestly you can discard it at any time β it's not clingy like that. but the contents of the structure? consider those private. it's private information, iykyk. π
β οΈ important caveat bestie: thebson_tMUST be valid for the entire lifetime of the view. and it is an error to modify thebson_twhile you're using the view. do not do it. i'm literally begging. π
π§ EXAMPLE π§
static const float values[] = {1.0f, 2.0f, 3.0f};
const size_t values_count = sizeof values / sizeof values[0];
bson_vector_float32_view_t view;
BSON_ASSERT (BSON_APPEND_VECTOR_FLOAT32_UNINIT (&doc, "vector", values_count, &view));
BSON_ASSERT (bson_vector_float32_view_write (view, values, values_count, 0));
ate, no crumbs. π₯
π«Ά SEE ALSO π«Ά
bson_append_vector_float32_uninit()bson_vector_float32_const_view_t
β AUTHOR β
MongoDB, Inc β icons only. π
π COPYRIGHT π
2009-present, MongoDB, Inc. β periodt, the whole entire time span. π
and that's the page! brought to you by libbson 2.5.6, dated Oct 09, 2026, with all the love and zero crumbs. 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