Skip to main content

TransferProgressExt

Trait TransferProgressExt 

Source
pub trait TransferProgressExt<This>
where This: TransferViewAlg,
{ // Required methods fn bytes_per_second(&self) -> Option<u64>; fn estimated_remaining(&self) -> Option<Duration>; fn percent(&self) -> Option<u16>; }
Expand description

Derives rate, remaining time, and completed share from observed bytes and elapsed time.

Required Methods§

Source

fn bytes_per_second(&self) -> Option<u64>

Derives average retrieved bytes per second once progress has duration.

Source

fn estimated_remaining(&self) -> Option<Duration>

Derives remaining time from average progress once the expected byte count is known.

Source

fn percent(&self) -> Option<u16>

Derives the completed share as whole percent once it is known.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<This> TransferProgressExt<This> for This
where This: TransferViewAlg,

Derives rate, remaining time, and completed share from observed bytes and elapsed time.