pub trait CacheReporter: Send + Sync {
// Required methods
fn on_validate_start(&self) -> usize;
fn on_validate_complete(&self, index: usize);
fn on_download_start(&self) -> usize;
fn on_download_progress(
&self,
index: usize,
progress: u64,
total: Option<u64>,
);
fn on_download_completed(&self, index: usize);
}Expand description
A trait that can be implemented to report progress of the download and validation process.
Required Methods§
Sourcefn on_validate_start(&self) -> usize
fn on_validate_start(&self) -> usize
Called when validation starts
Sourcefn on_validate_complete(&self, index: usize)
fn on_validate_complete(&self, index: usize)
Called when validation is complete
Sourcefn on_download_start(&self) -> usize
fn on_download_start(&self) -> usize
Called when a download starts
Sourcefn on_download_progress(&self, index: usize, progress: u64, total: Option<u64>)
fn on_download_progress(&self, index: usize, progress: u64, total: Option<u64>)
Called with regular updates on the download progress
Sourcefn on_download_completed(&self, index: usize)
fn on_download_completed(&self, index: usize)
Called when a download completes