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 saturating the sum of each entry’s length at u64::MAX.

§Preconditions

The entries must be disjoint (non-overlapping), as produced by Merge::merge_progress. Overlapping entries are silently counted twice, inflating the total. If the combined length exceeds u64::MAX, the result is u64::MAX.

Source§

fn total(&self) -> u64

Implementors§