Skip to main content

ProgressHook

Trait ProgressHook 

Source
pub trait ProgressHook: Send + Sync {
    // Required methods
    fn on_download_progress(&self, downloaded: u64, total: Option<u64>);
    fn on_processing_start(&self, message: &str);
    fn on_processing_progress(&self, current: usize, total: usize);
}
Expand description

Progress hook trait for monitoring download and processing progress

Required Methods§

Source

fn on_download_progress(&self, downloaded: u64, total: Option<u64>)

Called when download progress is updated

§Arguments
  • downloaded - Number of bytes downloaded so far
  • total - Total size in bytes (if known)
Source

fn on_processing_start(&self, message: &str)

Called when processing starts with a status message

§Arguments
  • message - Status message describing current operation
Source

fn on_processing_progress(&self, current: usize, total: usize)

Called when processing progress is updated

§Arguments
  • current - Current item being processed
  • total - Total items to process

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§