pub struct DownloadProgress {
pub bytes_to_download: usize,
pub bytes_downloaded: usize,
pub bytes_per_second: usize,
}Expand description
Represents the progress of a file download.
This struct tracks the total size, the amount downloaded so far, and the current download speed.
§Fields
bytes_to_download- The total number of bytes to be downloaded.bytes_downloaded- The number of bytes that have been downloaded so far.bytes_per_second- The current download speed in bytes per second.
§Example
use your_crate::DownloadProgress;
let progress = DownloadProgress {
bytes_to_download: 1_000_000,
bytes_downloaded: 500_000,
bytes_per_second: 200_000,
};
println!("{:?}", progress);Fields§
§bytes_to_download: usize§bytes_downloaded: usize§bytes_per_second: usizeTrait Implementations§
Source§impl Debug for DownloadProgress
impl Debug for DownloadProgress
Auto Trait Implementations§
impl Freeze for DownloadProgress
impl RefUnwindSafe for DownloadProgress
impl Send for DownloadProgress
impl Sync for DownloadProgress
impl Unpin for DownloadProgress
impl UnwindSafe for DownloadProgress
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more