Skip to main content

ProgressReporter

Trait ProgressReporter 

Source
pub(crate) trait ProgressReporter: Send + Sync {
    // Required methods
    fn start_phase(&self, name: &str, total: Option<u64>);
    fn inc(&self, delta: u64);
    fn finish_phase(&self);
}
Expand description

Receives progress events from long-running Export/Import V2 work.

The trait is object-safe so callers can take &dyn ProgressReporter and stay agnostic about the concrete implementation (no-op in production today, a recording fake in tests).

Required Methods§

Source

fn start_phase(&self, name: &str, total: Option<u64>)

Begins a phase with an optional known total number of units.

Source

fn inc(&self, delta: u64)

Advances the current phase by delta units.

Source

fn finish_phase(&self)

Marks the current phase as finished.

Implementors§