pub struct VectorStorage { /* private fields */ }Implementations§
Source§impl VectorStorage
impl VectorStorage
pub fn new(db_path: &Path) -> Result<Self>
pub fn add_drawer(&self, drawer: &Drawer, vector: &[f32]) -> Result<()>
pub fn delete_drawer(&self, id: &str) -> Result<usize>
pub fn search( &self, query_vec: &[f32], limit: usize, wing: Option<&str>, room: Option<&str>, ) -> Result<Vec<SearchResult>>
pub fn get_all( &self, wing: Option<&str>, room: Option<&str>, limit: usize, ) -> Result<Vec<Drawer>>
pub fn count(&self) -> Result<usize>
pub fn list_wings(&self) -> Result<Vec<(String, usize)>>
pub fn list_rooms( &self, wing: Option<&str>, ) -> Result<Vec<(String, String, usize)>>
pub fn get_taxonomy(&self) -> Result<Value>
Auto Trait Implementations§
impl Freeze for VectorStorage
impl RefUnwindSafe for VectorStorage
impl Send for VectorStorage
impl Sync for VectorStorage
impl Unpin for VectorStorage
impl UnsafeUnpin for VectorStorage
impl UnwindSafe for VectorStorage
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> 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