pub trait ProgressMultiline {
    // Required methods
    fn create(
        &mut self,
        message: String,
        total_files: u64
    ) -> Rc<RefCell<dyn ProgressIndicator>>;
    fn update_dir(&self, new_dir: OsString);
    fn finalise(&self);
    fn debug_string(&self) -> String;
}
Expand description

Multiline progress indicator trait

The progress indicator is used to simultaneously display the directory the DuDe is currently searching for files and the (approximate) overall progress of duplicate file search. It is used in the initial phase when the DuDe searches the added directories for duplicates.

All of the methods will generally be called multiple times.

Required Methods§

source

fn create( &mut self, message: String, total_files: u64 ) -> Rc<RefCell<dyn ProgressIndicator>>

This method should initialise the multiline progress indicator and return a simple progress indicator for tracking the overall progress of duplicate file search.

The simple progress indicator returned will indicate approximately how many files have been processed (i.e. been hashed) out of the total_files number of files. The simple progress indicator will be updated independently of the ProgressAddDir indicator via its own update method.

The create() method of the simple progress indicator returned is not called. If you need it to be called, call it inside this method.

This method can in general be called multiple times.

Arguments:
  • message - message to be displayed by the multiline indicator
  • total_files - total number of files the DuDe will process
source

fn update_dir(&self, new_dir: OsString)

Update the directory displayed by the multiline progress indicator

source

fn finalise(&self)

Finish the indicator of directory processing in ProgressMultiline indicator

The progress indicator tracking the overall progress of of duplicate file search (that was returned by create method) is finalised separately by its own finalise() method.

source

fn debug_string(&self) -> String

Print some pretty debug string

Trait Implementations§

source§

impl Debug for dyn ProgressMultiline

source§

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

Formats the value using the given formatter. Read more

Implementors§