Skip to main content

devboy_assets/
lib.rs

1//! Asset management for devboy-tools.
2//!
3//! This crate provides a local, on-disk cache for files downloaded from
4//! providers (issue attachments, MR uploads, messenger files, ...) together
5//! with an index of metadata, LRU rotation, and an integrity check.
6//!
7//! The public surface is centered on [`AssetManager`], which wraps a
8//! [`CacheManager`] and an on-disk [`AssetIndex`].
9//!
10//! See `docs/architecture/adr/ADR-010-asset-management.md` for the full design.
11
12#![deny(rustdoc::broken_intra_doc_links)]
13#![deny(rustdoc::private_intra_doc_links)]
14#![deny(rustdoc::invalid_html_tags)]
15
16pub mod cache;
17pub mod config;
18pub mod error;
19pub mod index;
20pub mod manager;
21pub mod rotation;
22
23pub use cache::{CacheManager, StoredFile};
24pub use config::{AssetConfig, EvictionPolicy, ResolvedAssetConfig};
25pub use error::{AssetError, Result};
26pub use index::{AssetIndex, CachedAsset, NewCachedAsset};
27pub use manager::{AssetManager, ResolvedAsset, StoreRequest};
28pub use rotation::{RotationStats, Rotator};