pub struct MmapVectorStore {
pub path: PathBuf,
pub dimension: usize,
pub count: usize,
pub capacity: usize,
/* private fields */
}Fields§
§path: PathBuf§dimension: usize§count: usize§capacity: usizeImplementations§
Source§impl MmapVectorStore
impl MmapVectorStore
pub fn create( path: &Path, dimension: usize, initial_capacity: usize, ) -> Result<Self>
pub fn open(path: &Path) -> Result<Self>
pub fn append(&mut self, vector: &Vector) -> Result<usize>
pub fn overwrite(&mut self, index: usize, vector: &Vector) -> Result<()>
pub fn get(&self, index: usize) -> Result<Vector>
pub fn get_all(&self) -> Result<Vec<(usize, Vector)>>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn dimension(&self) -> usize
pub fn flush(&self) -> Result<()>
Auto Trait Implementations§
impl Freeze for MmapVectorStore
impl RefUnwindSafe for MmapVectorStore
impl Send for MmapVectorStore
impl Sync for MmapVectorStore
impl Unpin for MmapVectorStore
impl UnsafeUnpin for MmapVectorStore
impl UnwindSafe for MmapVectorStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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