Skip to main content

ProgressReporter

Struct ProgressReporter 

Source
pub struct ProgressReporter { /* private fields */ }
Expand description

Central progress registry and exclusive human-facing terminal owner.

Implementations§

Source§

impl ProgressReporter

Source

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.

Source

pub fn for_configuration( configuration: &ProjectConfig, ) -> ProgressReporterBuilder

Creates a builder from the lower-level three-file project configuration.

Source

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.

Source

pub fn report(&self, message: impl Into<String>) -> Result<(), ReportingError>

Sends one application-wide message through the sole renderer.

Source

pub fn summary(&self) -> ProgressSummary

Returns a non-blocking snapshot of all task lifecycle counts.

Source

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.

Source

pub fn fail( self, message: impl Into<String>, ) -> Result<ProgressSummary, ReportingError>

Finishes an unsuccessful session while preserving all task statuses.

Source

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.

Trait Implementations§

Source§

impl Debug for ProgressReporter

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for ProgressReporter

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.