pub trait Reduce: Iterator + Sized {
// Provided methods
fn reduce_with<R>(self) -> R
where R: Reductor<Self::Item>,
R::State: Default { ... }
fn fold_with<R, I>(self, init: I) -> R
where R: Reductor<Self::Item>,
R::State: From<I> { ... }
}Provided Methods§
Sourcefn reduce_with<R>(self) -> R
fn reduce_with<R>(self) -> R
Similar to Iterator::reduce, but uses a generic implementation of Reductor,
instead of a function parameter, to supply the reduction logic.
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.