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 rehydration must use.
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>
Finish the index with vectors ALREADY PLACED in PRISM-internal order
(filled = how many slots the loader filled; must be exactly n).
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