pub struct IndexInfo {
pub format_version: u32,
pub levels: u32,
pub metric: Metric,
pub is_normalized: Option<bool>,
pub total_items: u32,
pub next_item_id: u32,
pub total_representatives: u32,
}Expand description
An index’s info/* fields and representative count, read without
loading the tree.
Fields§
§format_version: u32The version of the on-disk format. An index missing the field but otherwise complete reads as the current version.
levels: u32Node levels below the root; the last one holds the leaves.
metric: Metric§is_normalized: Option<bool>Whether every stored embedding is unit-length, or None if the index
does not say.
total_items: u32Items stored in the index.
next_item_id: u32The id insert gives the next item. Equal to total_items unless a
crash stopped an insert between taking ids and writing the items.
total_representatives: u32How many representatives the build picked, one per leaf node. Read
from /rep_item_ids’s length.
Implementations§
Auto Trait Implementations§
impl Freeze for IndexInfo
impl RefUnwindSafe for IndexInfo
impl Send for IndexInfo
impl Sync for IndexInfo
impl Unpin for IndexInfo
impl UnsafeUnpin for IndexInfo
impl UnwindSafe for IndexInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more