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//! - [`references`]: splitting a pasted reference list.
11//! - [`resilience`]: per-provider [`ResiliencePolicy`].
12//! - [`http`]: the [`HttpClient`] transport seam.
13//! - `testing` (feature): fixture replay for provider tests.
14
15pub mod csl;
16pub mod error;
17mod fold;
18pub mod http;
19pub mod id;
20pub mod matching;
21pub mod provider;
22pub mod publication;
23pub mod record;
24pub mod references;
25pub mod resilience;
26pub mod work;
27
28#[cfg(feature = "testing")]
29pub mod testing;
30
31pub use error::{Error, ErrorCategory, ErrorKind, Result};
32pub use http::{HttpClient, HttpRequest, HttpResponse};
33pub use id::{
34    ArxivId, CorpusId, Doi, IdError, IdKind, Isbn, Nbk, OpenAlexId, Pmcid, Pmid, S2PaperId, WorkId,
35    canonical,
36};
37pub use matching::{Agreement, Alternative, Assessment, Claim, FieldCheck};
38pub use provider::{
39    Capabilities, Cursor, Filter, Hit, Lookup, Page, PageReq, Provider, ProviderId, Response,
40    SearchMode, SearchQuery, Usage, YearRange,
41};
42pub use record::{Field, FieldSet, Raw, SourceRecord};
43pub use references::{IndentedLine, LineReference, Reference, split_lines, split_references};
44pub use resilience::ResiliencePolicy;
45pub use work::{
46    OpenAccess, PartialDate, Person, Update, UpdateKind, UpdateTo, Work, WorkType, tidy_abstract,
47};