Trait cgats::PartialSum
source · pub trait PartialSum<'a, T>: 'a + PartialAdd<Self, Output = T> {
// Required method
fn partial_sum<I: IntoIterator<Item = &'a Self>>(
iter: I
) -> Option<Self::Output>;
}
Expand description
Trait to sum an iterator of values that may or may not be compatible
Required Methods§
sourcefn partial_sum<I: IntoIterator<Item = &'a Self>>(
iter: I
) -> Option<Self::Output>
fn partial_sum<I: IntoIterator<Item = &'a Self>>( iter: I ) -> Option<Self::Output>
Try to sum the values in the iterator
Object Safety§
This trait is not object safe.