pub struct MmapPostingData { /* private fields */ }Expand description
Mmap’d posting data — read-only view of sparse.mmap.
Implementations§
Source§impl MmapPostingData
impl MmapPostingData
pub fn open(path: &Path) -> Result<Self, String>
pub fn num_dims(&self) -> usize
pub fn num_vectors(&self) -> usize
Sourcepub fn entries(&self, dim_idx: usize) -> &[PostingEntry]
pub fn entries(&self, dim_idx: usize) -> &[PostingEntry]
The entries of a remapped dimension, sorted by record id; empty for an empty or unknown dimension.
Sourcepub fn cursor(&self, dim_idx: usize) -> Option<MmapCursor<'_>>
pub fn cursor(&self, dim_idx: usize) -> Option<MmapCursor<'_>>
Cursor over a remapped dimension, None when it has no postings.
Sourcepub fn load_postings(&self, dim_idx: usize) -> Postings
pub fn load_postings(&self, dim_idx: usize) -> Postings
Load a dimension’s entries into an in-RAM list, recomputing the ceilings from the weights.
Auto Trait Implementations§
impl Freeze for MmapPostingData
impl RefUnwindSafe for MmapPostingData
impl Send for MmapPostingData
impl Sync for MmapPostingData
impl Unpin for MmapPostingData
impl UnsafeUnpin for MmapPostingData
impl UnwindSafe for MmapPostingData
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