Skip to main content

aspero_core/
lib.rs

1//! Core types, identifier parsing/normalisation, the `Provider` trait and errors. No I/O.
2//!
3//! - [`id`]: identifiers and their normalisation.
4//! - [`csl`]: lenient CSL-JSON reading.
5//! - [`work`]: the provider-neutral [`Work`] model.
6//! - [`record`]: [`SourceRecord`], one provider's view of one work.
7//! - [`provider`]: the [`Provider`] trait and its request/response types.
8//! - [`error`]: the shared [`Error`] contract.
9//! - [`matching`]: does a record match what a citation claims?
10//! - [`resilience`]: per-provider [`ResiliencePolicy`].
11//! - [`http`]: the [`HttpClient`] transport seam.
12//! - `testing` (feature): fixture replay for provider tests.
13
14pub mod csl;
15pub mod error;
16pub mod http;
17pub mod id;
18pub mod matching;
19pub mod provider;
20pub mod record;
21pub mod resilience;
22pub mod work;
23
24#[cfg(feature = "testing")]
25pub mod testing;
26
27pub use error::{Error, ErrorCategory, Result};
28pub use http::{HttpClient, HttpRequest, HttpResponse};
29pub use id::{
30    ArxivId, CorpusId, Doi, IdError, IdKind, Isbn, OpenAlexId, Pmcid, Pmid, S2PaperId, WorkId,
31};
32pub use matching::{Agreement, Assessment, Claim, FieldCheck};
33pub use provider::{
34    Capabilities, Cursor, Filter, Hit, Lookup, Page, PageReq, Provider, ProviderId, Response,
35    SearchMode, SearchQuery, Usage, YearRange,
36};
37pub use record::{Field, FieldSet, Raw, SourceRecord};
38pub use resilience::ResiliencePolicy;
39pub use work::{PartialDate, Person, Update, UpdateKind, UpdateTo, Work, WorkType, tidy_abstract};