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§
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>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".