pub struct UploadProgress {
pub bytes_uploaded: usize,
pub total_bytes: usize,
pub percentage: f64,
pub chunks_uploaded: usize,
pub total_chunks: usize,
pub started_at: Instant,
pub estimated_time_remaining: Option<f64>,
pub upload_speed: f64,
}Expand description
Upload progress information
Fields§
§bytes_uploaded: usizeCurrent number of bytes uploaded
total_bytes: usizeTotal file size in bytes
percentage: f64Progress percentage (0.0 - 100.0)
chunks_uploaded: usizeNumber of chunks uploaded
total_chunks: usizeTotal number of chunks
started_at: InstantUpload start time
estimated_time_remaining: Option<f64>Estimated time remaining in seconds
upload_speed: f64Upload speed in bytes per second
Implementations§
Source§impl UploadProgress
impl UploadProgress
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if upload is complete
Sourcepub fn formatted_speed(&self) -> String
pub fn formatted_speed(&self) -> String
Get formatted upload speed (e.g., “1.5 MB/s”)
Sourcepub fn formatted_eta(&self) -> String
pub fn formatted_eta(&self) -> String
Get formatted estimated time remaining (e.g., “2m 30s”)
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more