Struct mini_rag::naive::NaiveVectorStore
source · pub struct NaiveVectorStore { /* private fields */ }Trait Implementations§
source§impl VectorStore for NaiveVectorStore
impl VectorStore for NaiveVectorStore
fn new<'async_trait>(
embedder: Box<dyn Embedder>,
config: Configuration,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
fn add<'life0, 'async_trait>(
&'life0 mut self,
document: Document,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn retrieve<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Document, f64)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for NaiveVectorStore
impl !RefUnwindSafe for NaiveVectorStore
impl Send for NaiveVectorStore
impl Sync for NaiveVectorStore
impl Unpin for NaiveVectorStore
impl !UnwindSafe for NaiveVectorStore
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