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§

source

fn total_read(&self) -> usize

The total number of bytes that have been read from this reader

source

fn assummed_total_size(&self) -> usize

The assumed total number of bytes in this reader, created when this object was created.

source

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.

source

fn read_start_time(&self) -> Option<Instant>

When did this reader start reading None if it hasn’t started

Provided Methods§

source

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

source

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

source

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

Total estimated duration this reader will run for. None if it hasn’t started yet

source

fn bytes_per_sec(&self) -> Option<f64>

How many bytes per second are being read. None if it hasn’t started

Implementors§