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
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".