pub struct DownloadProgress {
pub id: String,
pub file_name: String,
pub destination_path: String,
pub bytes_downloaded: u64,
pub total_bytes: u64,
pub state: DownloadState,
pub checksum_verified: bool,
}Expand description
Progress of a download operation.
Fields§
§id: StringUnique download identifier.
file_name: StringName of the file being downloaded.
destination_path: StringLocal destination path.
bytes_downloaded: u64Bytes downloaded so far.
total_bytes: u64Total file size in bytes.
state: DownloadStateCurrent state of the download.
checksum_verified: boolWhether checksum was verified after download.
Implementations§
Source§impl DownloadProgress
impl DownloadProgress
Sourcepub fn percent_complete(&self) -> u32
pub fn percent_complete(&self) -> u32
Returns download progress as a percentage (0-100).
Trait Implementations§
Source§impl Clone for DownloadProgress
impl Clone for DownloadProgress
Source§fn clone(&self) -> DownloadProgress
fn clone(&self) -> DownloadProgress
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DownloadProgress
impl Debug for DownloadProgress
Source§impl<'de> Deserialize<'de> for DownloadProgress
impl<'de> Deserialize<'de> for DownloadProgress
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DownloadProgress
impl PartialEq for DownloadProgress
Source§impl Serialize for DownloadProgress
impl Serialize for DownloadProgress
impl Eq for DownloadProgress
impl StructuralPartialEq 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 UnsafeUnpin 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