Skip to main content

SourceAdapter

Trait SourceAdapter 

Source
pub trait SourceAdapter: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn search<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
        max_results: usize,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<CandidatePaper>, CoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Port for external source adapters (PubMed, arXiv, OpenAlex, INSPIRE).

Required Methods§

Source

fn name(&self) -> &str

Human-readable name of this source (e.g., “pubmed”, “arxiv”).

Source

fn search<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 str, max_results: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<CandidatePaper>, CoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Search the source and return normalized candidate records.

Implementors§