pub trait Progress {
// Required methods
fn init(
&mut self,
size: usize,
filename: &str,
) -> impl Future<Output = ()> + Send;
fn update(&mut self, size: usize) -> impl Future<Output = ()> + Send;
fn finish(&mut self) -> impl Future<Output = ()> + Send;
}
Expand description
This trait is used by users of the lib to implement custom behavior during file downloads
Required Methods§
Sourcefn init(
&mut self,
size: usize,
filename: &str,
) -> impl Future<Output = ()> + Send
fn init( &mut self, size: usize, filename: &str, ) -> impl Future<Output = ()> + Send
At the start of the download The size is the total size in bytes of the file.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.