atomic_progress/lib.rs
1//! # `atomic_progress`
2//!
3//! A high-performance, thread-safe, and cloneable progress tracking library.
4//!
5//! `atomic_progress` provides primitives for tracking the state of long-running operations.
6//! It is designed to be:
7//!
8//! * **Headless**: It stores state (position, total, time) but does not enforce a specific rendering implementation.
9//! * **Concurrent**: Progress handles are cheap to clone ([`Arc`]-based) and safe to share across threads.
10//! * **Low Overhead**: Uses atomic primitives for hot-path updates (incrementing position) and coarse-grained locking ([`RwLock`]) for cold paths (metadata, snapshots).
11//!
12//! ## Modules
13//!
14//! * [`builder`]: Fluent interface for constructing complex [`Progress`] instances.
15//! * [`io`]: Wrappers for [`std::io::Read`] and [`std::io::Write`] that track progress automatically.
16//! * [`iter`]: Extension traits for tracking progress on Iterators.
17//! * [`progress`]: The core [`Progress`] state machine and snapshot logic.
18//! * [`stack`]: A collection for managing multiple progress indicators simultaneously.
19
20#![forbid(unsafe_code)]
21#![deny(missing_docs)]
22
23pub mod builder;
24pub mod io;
25pub mod iter;
26pub mod progress;
27pub mod stack;
28
29pub use builder::ProgressBuilder;
30pub use iter::{ProgressIter, ProgressIteratorExt};
31pub use progress::{Progress, ProgressSnapshot, ProgressType};
32pub use stack::{ProgressStack, ProgressStackSnapshot};