Skip to main content

CacheReporter

Trait CacheReporter 

Source
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§

Source

fn on_validate_start(&self) -> usize

Called when validation starts

Source

fn on_validate_complete(&self, index: usize)

Called when validation is complete

Source

fn on_download_start(&self) -> usize

Called when a download starts

Source

fn on_download_progress(&self, index: usize, progress: u64, total: Option<u64>)

Called with regular updates on the download progress

Source

fn on_download_completed(&self, index: usize)

Called when a download completes

Implementors§