Skip to main content

how_far/
lib.rs

1#![doc = include_str!("../README.md")]
2#![no_std]
3#![forbid(unsafe_code)]
4#![warn(missing_docs)]
5
6extern crate alloc;
7
8pub use enough::{AsStopReason, Stop, StopReason, Unstoppable};
9mod adapters;
10pub use adapters::WithStop;
11mod completion;
12mod ext;
13mod paced;
14mod phases;
15mod pulse;
16mod report;
17mod stages;
18mod stop_only;
19mod try_stages;
20
21pub use completion::{Complete, ResultExt};
22pub use ext::ProgressExt;
23pub use paced::Paced;
24pub use phases::Phases;
25pub use pulse::{
26    Child, ChildPulse, Execution, Inert, NoPulse, Outcome, PhaseSpec, PlanError, Pulse,
27    SharedPulse, Total,
28};
29pub use report::{NoReport, ProgressWithStop, Report};
30pub use stages::{Stage, StageKey, Stages};
31pub use stop_only::StopOnly;
32pub use try_stages::{RunError, TryStages};
33
34/// The traits whose methods library code calls: `use how_far::prelude::*;`.
35///
36/// Trait methods need their trait in scope. `&dyn Pulse` brings its own, but
37/// values such as [`ProgressExt::live`]'s `Option` or a [`SharedPulse`] need
38/// `Stop`, `Report` and `ProgressExt` imported to call `check`, `advance` and
39/// `step`.
40pub mod prelude {
41    pub use crate::{AsStopReason, Complete, ProgressExt, Pulse, Report, ResultExt, Stop};
42}