Skip to main content

ProgressReporter

Trait ProgressReporter 

Source
pub trait ProgressReporter {
    // Required methods
    fn phase_starting(&mut self, phase: &str);
    fn phase_progress(&mut self, progress: f64);
    fn phase_complete(&mut self);
    fn warn(&mut self, message: &str);
    fn info(&mut self, message: &str);
}
Expand description

Environment trait for progress reporting.

Implementations can report progress to different targets:

  • TUI progress bars
  • CLI spinners
  • Quiet mode (no output)
  • Tests (capture output)

Required Methods§

Source

fn phase_starting(&mut self, phase: &str)

Report that a phase is starting.

Source

fn phase_progress(&mut self, progress: f64)

Report progress within a phase (0.0 - 1.0).

Source

fn phase_complete(&mut self)

Report that a phase completed.

Source

fn warn(&mut self, message: &str)

Report a warning during analysis.

Source

fn info(&mut self, message: &str)

Report an info message during analysis.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§