pub struct Progress {
pub logical_bytes: u64,
pub wire_bytes: u64,
pub bytes_total: u64,
pub chunks: u64,
pub chunks_compressed: u64,
pub chunks_skipped: u64,
pub chunks_zero: u64,
pub chunks_reused: u64,
pub compressor_runs: u64,
pub files_completed: u64,
pub files_total: u64,
pub elapsed: Duration,
}Expand description
A point-in-time view of a transfer.
Fields§
§logical_bytes: u64Payload bytes transferred, measured as they exist on disk.
wire_bytes: u64Bytes actually put on the wire.
bytes_total: u64§chunks: u64§chunks_compressed: u64§chunks_skipped: u64§chunks_zero: u64§chunks_reused: u64Chunks the receiver already had; the payload never crossed the wire.
compressor_runs: u64Chunks handed to the compressor. Compare with chunks_compressed: the
difference is compression work whose output was discarded.
files_completed: u64§files_total: u64§elapsed: DurationImplementations§
Source§impl Progress
impl Progress
Sourcepub fn throughput(&self) -> f64
pub fn throughput(&self) -> f64
Effective throughput in bytes/sec, measured against logical bytes. This is the number a user cares about: how fast their data moved, not how many packets it took.
Sourcepub fn wire_throughput(&self) -> f64
pub fn wire_throughput(&self) -> f64
Throughput measured against bytes actually sent.
Sourcepub fn compression_ratio(&self) -> f64
pub fn compression_ratio(&self) -> f64
Compression ratio achieved, logical / wire. 1.0 means no saving.
Trait Implementations§
impl Copy for Progress
impl Eq for Progress
impl StructuralPartialEq for Progress
Auto Trait Implementations§
impl Freeze for Progress
impl RefUnwindSafe for Progress
impl Send for Progress
impl Sync for Progress
impl Unpin for Progress
impl UnsafeUnpin for Progress
impl UnwindSafe for Progress
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