pub struct ProgressReporter { /* private fields */ }Expand description
Central progress registry and exclusive human-facing terminal owner.
Implementations§
Source§impl ProgressReporter
impl ProgressReporter
Sourcepub fn for_project(project: &ScientificProject) -> ProgressReporterBuilder
pub fn for_project(project: &ScientificProject) -> ProgressReporterBuilder
Creates a builder from a conventional four-file scientific project.
By default all sweep keys, in declaration order, form task identity.
Sourcepub fn for_configuration(
configuration: &ProjectConfig,
) -> ProgressReporterBuilder
pub fn for_configuration( configuration: &ProjectConfig, ) -> ProgressReporterBuilder
Creates a builder from the lower-level three-file project configuration.
Sourcepub fn start_task(
&self,
task: &TaskConfig,
initial_iteration: u64,
target_iteration: Option<u64>,
) -> Result<TaskProgress, ReportingError>
pub fn start_task( &self, task: &TaskConfig, initial_iteration: u64, target_iteration: Option<u64>, ) -> Result<TaskProgress, ReportingError>
Starts tracking one task using identity and ordering from TaskConfig.
initial_iteration and target_iteration are absolute scientific
coordinates. A missing target creates an indeterminate progress display.
Callers never supply an ordinal or terminal label.
Sourcepub fn report(&self, message: impl Into<String>) -> Result<(), ReportingError>
pub fn report(&self, message: impl Into<String>) -> Result<(), ReportingError>
Sends one application-wide message through the sole renderer.
Sourcepub fn summary(&self) -> ProgressSummary
pub fn summary(&self) -> ProgressSummary
Returns a non-blocking snapshot of all task lifecycle counts.
Sourcepub fn complete(
self,
message: impl Into<String>,
) -> Result<ProgressSummary, ReportingError>
pub fn complete( self, message: impl Into<String>, ) -> Result<ProgressSummary, ReportingError>
Finishes a successful session and emits its final summary and message.
Every task must already be completed. The method stops and joins the renderer and releases exclusive terminal ownership.
Sourcepub fn fail(
self,
message: impl Into<String>,
) -> Result<ProgressSummary, ReportingError>
pub fn fail( self, message: impl Into<String>, ) -> Result<ProgressSummary, ReportingError>
Finishes an unsuccessful session while preserving all task statuses.
Sourcepub fn report_error(message: impl Display)
pub fn report_error(message: impl Display)
Emits one terminal error through the reporting subsystem.
This helper is intended for failures occurring before a reporting session starts or after it has released the terminal lease.