pub struct UploadStats {
pub total_layers: usize,
pub completed_layers: usize,
pub failed_layers: usize,
pub total_bytes: u64,
pub uploaded_bytes: u64,
pub start_time: Instant,
pub concurrent_uploads: usize,
pub avg_speed: u64,
pub peak_speed: u64,
}Fields§
§total_layers: usize§completed_layers: usize§failed_layers: usize§total_bytes: u64§uploaded_bytes: u64§start_time: Instant§concurrent_uploads: usize§avg_speed: u64§peak_speed: u64Implementations§
Source§impl UploadStats
impl UploadStats
pub fn new( total_layers: usize, total_bytes: u64, concurrent_uploads: usize, ) -> Self
pub fn add_completed_layer(&mut self, layer_size: u64)
pub fn add_failed_layer(&mut self)
pub fn completion_percentage(&self) -> f64
pub fn estimated_time_remaining(&self) -> Option<Duration>
Trait Implementations§
Source§impl Clone for UploadStats
impl Clone for UploadStats
Source§fn clone(&self) -> UploadStats
fn clone(&self) -> UploadStats
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 UploadStats
impl RefUnwindSafe for UploadStats
impl Send for UploadStats
impl Sync for UploadStats
impl Unpin for UploadStats
impl UnwindSafe for UploadStats
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