You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
we have a downloader code just like the follow:
`
let result = Downloader::new(url, &mut file).threads(4).callback(Box::new(|pro, total, speed| {
println!("---->>progress {:.2}% --- total {:?} --speed {}", (pro as f64 / (total as f64)) * 100.0, format_size(total, BINARY), speed);
}), 50).cache_path(PathBuf::from("./")).threshold_memory(5 * 1024 * 1024).download().map_err(|e| {
println!("{:?}", e);
});
`
my question is, do I have some way just post event in the callback function?
Beta Was this translation helpful? Give feedback.
All reactions