Skip to main content

research_master/models/
mod.rs

1//! Core data models for research papers and search operations.
2//!
3//! This module provides the primary data structures used throughout the library:
4//!
5//! - [`Paper`]: A unified representation of a research paper from any source
6//! - [`PaperBuilder`]: Fluent builder for constructing Paper objects
7//! - [`SearchQuery`]: Search parameters with builder-style API
8//! - [`SearchResponse`]: Search results with metadata
9//! - [`DownloadRequest`]/[`DownloadResult`]: Paper download operations
10//! - [`ReadRequest`]/[`ReadResult`]: PDF text extraction operations
11//! - [`CitationRequest`]: Citation and reference lookup
12//! - [`SourceType`]: Enum of all supported research sources
13//!
14//! # Examples
15//!
16//! ```rust
17//! use research_master::models::{Paper, PaperBuilder, SourceType, SearchQuery};
18//!
19//! // Create a paper using the builder
20//! let paper = PaperBuilder::new(
21//!     "2301.12345",
22//!     "My Paper Title",
23//!     "https://example.com/paper",
24//!     SourceType::Arxiv
25//! )
26//! .authors("Jane Doe; John Smith")
27//! .abstract_text("This is the abstract.")
28//! .doi("10.1234/example.1234")
29//! .build();
30//!
31//! // Create a search query
32//! let query = SearchQuery::new("machine learning")
33//!     .max_results(20)
34//!     .year("2020-");
35//! ```
36
37mod paper;
38mod search;
39
40pub use paper::{Paper, PaperBuilder, SourceType};
41pub use search::{
42    BatchDownloadRequest, BatchDownloadResult, CitationRequest, DownloadRequest, DownloadResult,
43    ReadRequest, ReadResult, SearchQuery, SearchResponse, SortBy, SortOrder,
44};