ssh_encoding

Trait CheckedSum

Source
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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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