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§
Sourcefn 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,
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.