pub struct ArxivClient { /* private fields */ }Expand description
Client for ArXiv.org preprint API
Provides methods to search for academic papers, filter by category, and convert results to SemanticVector format for RuVector analysis.
§Rate Limiting
The client automatically enforces ArXiv’s rate limit of 1 request per 3 seconds. Includes retry logic for transient failures.
Implementations§
Source§impl ArxivClient
impl ArxivClient
Sourcepub fn with_embedding_dim(embedding_dim: usize) -> Self
pub fn with_embedding_dim(embedding_dim: usize) -> Self
Create a new ArXiv API client with custom embedding dimension
§Arguments
embedding_dim- Dimension for text embeddings (default: 384)
Sourcepub async fn search_category(
&self,
category: &str,
max_results: usize,
) -> Result<Vec<SemanticVector>>
pub async fn search_category( &self, category: &str, max_results: usize, ) -> Result<Vec<SemanticVector>>
Search papers by ArXiv category
§Arguments
category- ArXiv category code (e.g., “cs.AI”, “physics.ao-ph”, “q-fin.ST”)max_results- Maximum number of results to return
§Supported Categories
cs.AI- Artificial Intelligencecs.LG- Machine Learningcs.CL- Computation and Languagestat.ML- Statistics - Machine Learningq-fin.*- Quantitative Finance (ST, PM, TR, etc.)physics.ao-ph- Atmospheric and Oceanic Physicsecon.*- Economics
§Example
ⓘ
let ai_papers = client.search_category("cs.AI", 100).await?;
let climate_papers = client.search_category("physics.ao-ph", 50).await?;Sourcepub async fn search_recent(
&self,
category: &str,
days: u64,
) -> Result<Vec<SemanticVector>>
pub async fn search_recent( &self, category: &str, days: u64, ) -> Result<Vec<SemanticVector>>
Sourcepub async fn search_multiple_categories(
&self,
categories: &[&str],
max_results_per_category: usize,
) -> Result<Vec<SemanticVector>>
pub async fn search_multiple_categories( &self, categories: &[&str], max_results_per_category: usize, ) -> Result<Vec<SemanticVector>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArxivClient
impl !RefUnwindSafe for ArxivClient
impl Send for ArxivClient
impl Sync for ArxivClient
impl Unpin for ArxivClient
impl !UnwindSafe for ArxivClient
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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