Skip to main content

VectorManifest

Struct VectorManifest 

Source
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: String

Caller-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: usize

Vector dimension. Every entry in every shard carries exactly this many floats.

§shards: u16

Number 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

Source

pub fn new(space: impl Into<String>, dim: usize, shards: u16) -> Self

An empty manifest for a new index.

Source

pub fn key( namespace: impl Into<String>, index_id: impl Into<String>, ) -> RecordKey

The stable RecordKey addressing the index index_id in namespace.

Source

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.

Source

pub fn to_body(&self) -> Body

Serialize into an inline record Body (deterministic key order).

Source

pub fn from_body(body: &Body) -> Result<Self>

Reconstruct from a record Body. Errors if the bytes are not a valid serialized manifest.

Trait Implementations§

Source§

impl Clone for VectorManifest

Source§

fn clone(&self) -> VectorManifest

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VectorManifest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for VectorManifest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for VectorManifest

Source§

impl PartialEq for VectorManifest

Source§

fn eq(&self, other: &VectorManifest) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for VectorManifest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for VectorManifest

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.