Skip to main content

ProgressReporter

Trait ProgressReporter 

Source
pub trait ProgressReporter: Send + Sync {
    // Required methods
    fn report_progress(
        &self,
        percentage: Option<u8>,
        bytes: Option<u64>,
        bytes_per_sec: Option<f64>,
    ) -> Result<(), &'static str>;
    fn report_complete(&self) -> Result<(), &'static str>;
}
Expand description

Trait for reporting download/upload progress.

Required Methods§

Source

fn report_progress( &self, percentage: Option<u8>, bytes: Option<u64>, bytes_per_sec: Option<f64>, ) -> Result<(), &'static str>

Source

fn report_complete(&self) -> Result<(), &'static str>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§