Skip to main content

Total

Trait Total 

Source
pub trait Total {
    // Required method
    fn total(&self) -> u64;
}
Expand description

Trait for computing the total size from one or more ProgressEntry values.

Required Methods§

Source

fn total(&self) -> u64

Total number of bytes represented by this progress value.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Total for Vec<ProgressEntry>

Total number of bytes across all entries, computed by summing each entry’s length.

§Preconditions

The entries must be disjoint (non-overlapping), as produced by Merge::merge_progress. Overlapping entries are silently counted twice, inflating the total; and the naive u64 sum is unchecked, so a combined length beyond u64::MAX panics in debug builds and wraps in release.

Source§

fn total(&self) -> u64

Implementors§