pub struct UploadProgress {
pub bytes_uploaded: u64,
pub total_bytes: u64,
pub percentage: f64,
pub speed_bps: Option<f64>,
pub eta_seconds: Option<f64>,
}
Expand description
Upload progress information
Fields§
§bytes_uploaded: u64
Bytes uploaded so far
total_bytes: u64
Total bytes to upload
percentage: f64
Upload percentage (0-100)
speed_bps: Option<f64>
Upload speed in bytes per second
eta_seconds: Option<f64>
Estimated time remaining in seconds
Implementations§
Source§impl UploadProgress
impl UploadProgress
Sourcepub fn with_speed(self, speed_bps: f64) -> Self
pub fn with_speed(self, speed_bps: f64) -> Self
Update with speed calculation
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if upload is complete
Sourcepub fn percentage_string(&self) -> String
pub fn percentage_string(&self) -> String
Get human-readable percentage
Sourcepub fn size_string(&self) -> String
pub fn size_string(&self) -> String
Get human-readable size
Sourcepub fn speed_string(&self) -> Option<String>
pub fn speed_string(&self) -> Option<String>
Get human-readable speed
Sourcepub fn eta_string(&self) -> Option<String>
pub fn eta_string(&self) -> Option<String>
Get human-readable ETA
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 moreAuto Trait Implementations§
impl Freeze for UploadProgress
impl RefUnwindSafe for UploadProgress
impl Send for UploadProgress
impl Sync for UploadProgress
impl Unpin 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