BSON_VECTOR_FLOAT32_VIEW_T(3)

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

πŸ’… 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: the bson_t MUST be valid for the entire lifetime of the view. and it is an error to modify the bson_t while 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. πŸ‘‘


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