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§
Sourcefn on_download_progress(&self, downloaded: u64, total: Option<u64>)
fn on_download_progress(&self, downloaded: u64, total: Option<u64>)
Called when download progress is updated
§Arguments
downloaded- Number of bytes downloaded so fartotal- Total size in bytes (if known)
Sourcefn on_processing_start(&self, message: &str)
fn on_processing_start(&self, message: &str)
Called when processing starts with a status message
§Arguments
message- Status message describing current operation
Sourcefn on_processing_progress(&self, current: usize, total: usize)
fn on_processing_progress(&self, current: usize, total: usize)
Called when processing progress is updated
§Arguments
current- Current item being processedtotal- Total items to process
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".