pub trait CheckedSum<A>: Sized {
    // Required method
    fn checked_sum(self) -> Result<A>;
}
Expand description

Extension trait for providing checked Iterator::sum-like functionality.

Required Methods§

source

fn checked_sum(self) -> Result<A>

Iterate over the values of this type, computing a checked sum.

Returns Error::Length on overflow.

Implementors§

source§

impl<T> CheckedSum<usize> for Twhere T: IntoIterator<Item = usize>,