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 publication;
21pub mod record;
22pub mod resilience;
23pub mod work;
24
25#[cfg(feature = "testing")]
26pub mod testing;
27
28pub use error::{Error, ErrorCategory, Result};
29pub use http::{HttpClient, HttpRequest, HttpResponse};
30pub use id::{
31    ArxivId, CorpusId, Doi, IdError, IdKind, Isbn, Nbk, OpenAlexId, Pmcid, Pmid, S2PaperId, WorkId,
32    canonical,
33};
34pub use matching::{Agreement, Assessment, Claim, FieldCheck};
35pub use provider::{
36    Capabilities, Cursor, Filter, Hit, Lookup, Page, PageReq, Provider, ProviderId, Response,
37    SearchMode, SearchQuery, Usage, YearRange,
38};
39pub use record::{Field, FieldSet, Raw, SourceRecord};
40pub use resilience::ResiliencePolicy;
41pub use work::{
42    OpenAccess, PartialDate, Person, Update, UpdateKind, UpdateTo, Work, WorkType, tidy_abstract,
43};