pub struct ProgressUpdate {
pub completed_bytes: u64,
pub download_speed: u64,
pub upload_speed: u64,
}Expand description
Progress update sent from a download command to the engine via channel.
This decouples the download task from the RequestGroup RwLock: instead of
acquiring group.write().await on every batched progress checkpoint, the
download task performs a cheap lock-free send and a single aggregator
task applies the update to the RequestGroup.
Fields:
completed_bytes: total bytes downloaded so far for this command.download_speed: current download speed in bytes/sec.0means the sender did not refresh the speed sample this tick (the aggregator keeps the previously cached value).upload_speed: upload speed in bytes/sec (BT only;0for HTTP/FTP).
Fields§
§completed_bytes: u64Total bytes downloaded so far for this command.
download_speed: u64Current download speed in bytes/sec (0 if not yet calculated).
upload_speed: u64Upload speed in bytes/sec (for BT, 0 for HTTP).
Trait Implementations§
Source§impl Clone for ProgressUpdate
impl Clone for ProgressUpdate
Source§fn clone(&self) -> ProgressUpdate
fn clone(&self) -> ProgressUpdate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ProgressUpdate
impl RefUnwindSafe for ProgressUpdate
impl Send for ProgressUpdate
impl Sync for ProgressUpdate
impl Unpin for ProgressUpdate
impl UnsafeUnpin for ProgressUpdate
impl UnwindSafe for ProgressUpdate
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