Skip to main content

ItertoolsNum

Trait ItertoolsNum 

Source
pub trait ItertoolsNum: Iterator {
    // Provided method
    fn cumsum<S>(self) -> Cumsum<Self, S> 
       where Self: Sized,
             S: Add<Self::Item, Output = S> + Zero { ... }
}
Expand description

Extension trait for iterators: extra adaptors and methods for numerical iterators

Provided Methods§

Source

fn cumsum<S>(self) -> Cumsum<Self, S>
where Self: Sized, S: Add<Self::Item, Output = S> + Zero,

Return an iterator that produces the sequence of cumulative sums of the base iterator. The type of the sum is S.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<I> ItertoolsNum for I
where I: Iterator + ?Sized,