Trait read_progress::ReadWithSize
source · pub trait ReadWithSize: Read {
// Required methods
fn total_read(&self) -> usize;
fn assummed_total_size(&self) -> usize;
fn fraction(&self) -> f64;
fn read_start_time(&self) -> Option<Instant>;
// Provided methods
fn eta(&self) -> Option<Duration> { ... }
fn etc(&self) -> Option<Instant> { ... }
fn est_total_time(&self) -> Option<Duration> { ... }
fn bytes_per_sec(&self) -> Option<f64> { ... }
}
Required Methods§
sourcefn total_read(&self) -> usize
fn total_read(&self) -> usize
The total number of bytes that have been read from this reader
sourcefn assummed_total_size(&self) -> usize
fn assummed_total_size(&self) -> usize
The assumed total number of bytes in this reader, created when this object was created.
sourcefn fraction(&self) -> f64
fn fraction(&self) -> f64
How far along this reader have we read? What fraction have we read? May be >1.0 if the initial provided assumed total size was wrong.
sourcefn read_start_time(&self) -> Option<Instant>
fn read_start_time(&self) -> Option<Instant>
When did this reader start reading
None
if it hasn’t started
Provided Methods§
sourcefn eta(&self) -> Option<Duration>
fn eta(&self) -> Option<Duration>
Estimated Time to Arrival, at this rate, what’s the predicted end time
None
if it hasn’t started yet
sourcefn etc(&self) -> Option<Instant>
fn etc(&self) -> Option<Instant>
Estimated Time to Completion, at this rate, how long before it is complete
None
if it hasn’t started yet
sourcefn est_total_time(&self) -> Option<Duration>
fn est_total_time(&self) -> Option<Duration>
Total estimated duration this reader will run for.
None
if it hasn’t started yet
sourcefn bytes_per_sec(&self) -> Option<f64>
fn bytes_per_sec(&self) -> Option<f64>
How many bytes per second are being read.
None
if it hasn’t started