pub struct UploadProgress {
pub id: String,
pub file_name: String,
pub file_path: String,
pub bytes_uploaded: u64,
pub total_bytes: u64,
pub state: UploadState,
pub started_at: i64,
pub checksum_verified: bool,
pub transfer_id: Option<String>,
pub resumed_from_bytes: Option<u64>,
}Expand description
Progress of an upload operation.
Fields§
§id: StringUnique upload identifier.
file_name: StringName of the file being uploaded.
file_path: StringDestination path within the disk.
bytes_uploaded: u64Bytes uploaded so far.
total_bytes: u64Total file size in bytes.
state: UploadStateCurrent state of the upload.
started_at: i64Unix timestamp (ms) when upload started.
checksum_verified: boolWhether checksum was verified after upload.
transfer_id: Option<String>Link to core TransferState for resume support.
resumed_from_bytes: Option<u64>Resume point in bytes (if this upload was resumed).
Implementations§
Source§impl UploadProgress
impl UploadProgress
Sourcepub fn percent_complete(&self) -> u32
pub fn percent_complete(&self) -> u32
Returns upload progress as a percentage (0-100).
Trait Implementations§
Source§impl Clone for UploadProgress
impl Clone for UploadProgress
Source§fn clone(&self) -> UploadProgress
fn clone(&self) -> UploadProgress
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 UploadProgress
impl Debug for UploadProgress
Source§impl<'de> Deserialize<'de> for UploadProgress
impl<'de> Deserialize<'de> for UploadProgress
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 UploadProgress
impl PartialEq for UploadProgress
Source§impl Serialize for UploadProgress
impl Serialize for UploadProgress
impl Eq for UploadProgress
impl StructuralPartialEq for UploadProgress
Auto Trait Implementations§
impl Freeze for UploadProgress
impl RefUnwindSafe for UploadProgress
impl Send for UploadProgress
impl Sync for UploadProgress
impl Unpin for UploadProgress
impl UnsafeUnpin for UploadProgress
impl UnwindSafe for UploadProgress
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