pub struct SparseVectorTable<'txn> { /* private fields */ }Expand description
Table for storing sparse vectors
Implementations§
Source§impl<'txn> SparseVectorTable<'txn>
impl<'txn> SparseVectorTable<'txn>
Sourcepub fn open(txn: &'txn WriteTransaction, name: &str) -> Result<Self, TableError>
pub fn open(txn: &'txn WriteTransaction, name: &str) -> Result<Self, TableError>
Opens a sparse vector table for writing
Sourcepub fn insert(
&mut self,
key: &Uuid,
vector: &SparseVector,
) -> Result<(), TableError>
pub fn insert( &mut self, key: &Uuid, vector: &SparseVector, ) -> Result<(), TableError>
Inserts a sparse vector
Sourcepub fn len(&self) -> Result<u64, StorageError>
pub fn len(&self) -> Result<u64, StorageError>
Returns the number of vectors stored
Sourcepub fn is_empty(&self) -> Result<bool, StorageError>
pub fn is_empty(&self) -> Result<bool, StorageError>
Returns true if the table is empty
Auto Trait Implementations§
impl<'txn> Freeze for SparseVectorTable<'txn>
impl<'txn> !RefUnwindSafe for SparseVectorTable<'txn>
impl<'txn> Send for SparseVectorTable<'txn>
impl<'txn> Sync for SparseVectorTable<'txn>
impl<'txn> Unpin for SparseVectorTable<'txn>
impl<'txn> !UnwindSafe for SparseVectorTable<'txn>
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