Trait Retriever

Source
pub trait Retriever: Sync + Send {
    // Required method
    fn get_relevant_documents<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Document>, Box<dyn Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn get_relevant_documents<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Document>, Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Trait Implementations§

Source§

impl<R> From<R> for Box<dyn Retriever>
where R: Retriever + 'static,

Source§

fn from(retriever: R) -> Self

Converts to this type from the input type.

Implementors§