pub struct SegmentParts { /* private fields */ }Expand description
Everything a segment carries; vectors arrive separately via
SegmentParts::into_index.
Implementations§
Source§impl SegmentParts
impl SegmentParts
pub fn n(&self) -> usize
pub fn dim(&self) -> u16
pub fn metric(&self) -> Metric
pub fn id_map(&self) -> &[u64]
Sourcepub fn internal_of_row(&self) -> FxHashMap<u64, u32>
pub fn internal_of_row(&self) -> FxHashMap<u64, u32>
row_id -> PRISM-internal slot: the PERMUTATION the rehydration loader uses.
Sourcepub fn into_index(
self,
vectors: Vec<f32>,
filled: usize,
) -> Result<AnnIndex, SegmentError>
pub fn into_index( self, vectors: Vec<f32>, filled: usize, ) -> Result<AnnIndex, SegmentError>
Build the index from externally-rehydrated vectors (id_map order); the sealed-load path.
Sourcepub fn into_index_embedded(self) -> AnnIndex
pub fn into_index_embedded(self) -> AnnIndex
Build the index from the segment’s embedded build-form vectors - the fast cold-load path.
Auto Trait Implementations§
impl Freeze for SegmentParts
impl RefUnwindSafe for SegmentParts
impl Send for SegmentParts
impl Sync for SegmentParts
impl Unpin for SegmentParts
impl UnsafeUnpin for SegmentParts
impl UnwindSafe for SegmentParts
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