how-far 0.1.0

Cancellation, progress, and weighted phases through one interface for library authors
Documentation
#![doc = include_str!("../README.md")]
#![no_std]
#![forbid(unsafe_code)]
#![warn(missing_docs)]

extern crate alloc;

pub use enough::{AsStopReason, Stop, StopReason, Unstoppable};
mod adapters;
pub use adapters::WithStop;
mod completion;
mod ext;
mod paced;
mod phases;
mod pulse;
mod report;
mod stages;
mod stop_only;
mod try_stages;

pub use completion::{Complete, ResultExt};
pub use ext::ProgressExt;
pub use paced::Paced;
pub use phases::Phases;
pub use pulse::{
    Child, ChildPulse, Execution, Inert, NoPulse, Outcome, PhaseSpec, PlanError, Pulse,
    SharedPulse, Total,
};
pub use report::{NoReport, ProgressWithStop, Report};
pub use stages::{Stage, StageKey, Stages};
pub use stop_only::StopOnly;
pub use try_stages::{RunError, TryStages};

/// The traits whose methods library code calls: `use how_far::prelude::*;`.
///
/// Trait methods need their trait in scope. `&dyn Pulse` brings its own, but
/// values such as [`ProgressExt::live`]'s `Option` or a [`SharedPulse`] need
/// `Stop`, `Report` and `ProgressExt` imported to call `check`, `advance` and
/// `step`.
pub mod prelude {
    pub use crate::{AsStopReason, Complete, ProgressExt, Pulse, Report, ResultExt, Stop};
}