Trait CacheReporter

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§

fn on_validate_start(&self) -> usize

Called when validation starts

fn on_validate_complete(&self, index: usize)

Called when validation completex

fn on_download_start(&self) -> usize

Called when a download starts

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

Called with regular updates on the download progress

fn on_download_completed(&self, index: usize)

Called when a download completes

Implementors§