pub struct VectorManifest {
pub space: String,
pub dim: usize,
pub shards: u16,
pub entries: BTreeMap<u16, ContentHash>,
}Expand description
A durable vector index’s manifest body.
entries is a BTreeMap so serialization has deterministic key order: a
manifest with the same contents always hashes identically, keeping its record
revision stable under content-addressed dedup.
Fields§
§space: StringCaller-declared embedding space, e.g. "bge-small-en-v1.5".
Gonzalo cannot verify a vector came from this model — it never sees the model. This records what the writer declared, which is enough to catch configuration drift when a reader declares something else.
dim: usizeVector dimension. Every entry in every shard carries exactly this many floats.
shards: u16Number of shards, fixed when the index is created.
entries: BTreeMap<u16, ContentHash>Shard id -> the blob holding that shard’s vectors.
Implementations§
Source§impl VectorManifest
impl VectorManifest
Sourcepub fn new(space: impl Into<String>, dim: usize, shards: u16) -> Self
pub fn new(space: impl Into<String>, dim: usize, shards: u16) -> Self
An empty manifest for a new index.
Sourcepub fn key(
namespace: impl Into<String>,
index_id: impl Into<String>,
) -> RecordKey
pub fn key( namespace: impl Into<String>, index_id: impl Into<String>, ) -> RecordKey
The stable RecordKey addressing the index index_id in namespace.
Sourcepub fn collection() -> &'static str
pub fn collection() -> &'static str
The collection segment every vector manifest is addressed under. A
KeyPrefix with this collection and no namespace
lists every index’s manifest. This is a naming convention for callers,
not the set GC unions: GC marks by
RecordKind::VectorManifest while
scanning every record regardless of collection, and a durable index’s
open accepts a manifest key under any namespace.
Trait Implementations§
Source§impl Clone for VectorManifest
impl Clone for VectorManifest
Source§fn clone(&self) -> VectorManifest
fn clone(&self) -> VectorManifest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more