1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Data collection and aggregation for Rust crates
//!
//! This module is responsible for gathering comprehensive information about Rust crates
//! from multiple external sources. It collects data from crates.io, GitHub repositories,
//! `RustSec` advisory database, code coverage services, and documentation hosting.
//!
//! # Implementation Model
//!
//! The core type is [`CrateFacts`], which aggregates data from various providers:
//! - **Crates.io data**: Version info, downloads, dependencies, metadata
//! - **Repository hosting**: GitHub stats (stars, forks, issues, commits)
//! - **Security advisories**: `RustSec` vulnerability and warning counts
//! - **Code analysis**: Line counts, unsafe usage, CI workflow detection
//! - **Coverage data**: Test coverage percentages from external services
//! - **Documentation**: Docs.rs metrics like doc coverage and broken links
//!
//! Each data source is wrapped in a [`ProviderResult`] which can be `Found`, `NotFound`,
//! or `Error`, allowing the system to gracefully handle partial data availability.
//!
//! The [`Collector`] orchestrates parallel data fetching with caching and rate limiting.
//! It uses a request tracker to deduplicate concurrent requests and maintains both
//! document-based caching (for raw API responses) and lock-based caching (for parsed
//! facts) to minimize redundant work and API calls.
pub
pub
pub
pub
pub
pub use Collector;
pub use CrateFacts;
pub use CrateRef;
pub use CrateSpec;
pub use CratesData;
pub use Progress;
pub use ProviderResult;
pub use RepoSpec;
pub use RequestTracker;