ProgressHandler

Trait ProgressHandler 

Source
pub trait ProgressHandler {
    // Provided methods
    fn on_empty(&self) { ... }
    fn on_set_total(&mut self, total: usize) { ... }
    fn inc(&self, progress: u64) { ... }
    fn success_inc(&self, progress: u64) { ... }
    fn failure_inc(&self, progress: u64) { ... }
    fn on_processing_path(&self, path: &Path) { ... }
    fn on_finish(&self) { ... }
}
Expand description

A trait for handling progress updates during a file verification process.

Provided Methods§

Source

fn on_empty(&self)

Called when no files are found in the directory.

The default implementation does nothing.

Source

fn on_set_total(&mut self, total: usize)

Sets the total number of items to process.

The default implementation does nothing.

Source

fn inc(&self, progress: u64)

Increments the progress by a specified amount.

The default implementation does nothing.

Source

fn success_inc(&self, progress: u64)

Increments success count.

The default implementation does nothing.

Source

fn failure_inc(&self, progress: u64)

Increments failure count.

The default implementation does nothing.

Source

fn on_processing_path(&self, path: &Path)

The path for the current progress state.

The default implementation does nothing.

Source

fn on_finish(&self)

Called when all files have been processed.

The default implementation does nothing.

Implementors§