Trait halo2_middleware::multicore::TryFoldAndReduce
source · pub trait TryFoldAndReduce<T, E> {
// Required method
fn try_fold_and_reduce(
self,
identity: impl Fn() -> T + Send + Sync,
fold_op: impl Fn(T, Result<T, E>) -> Result<T, E> + Send + Sync
) -> Result<T, E>;
}
Required Methods§
sourcefn try_fold_and_reduce(
self,
identity: impl Fn() -> T + Send + Sync,
fold_op: impl Fn(T, Result<T, E>) -> Result<T, E> + Send + Sync
) -> Result<T, E>
fn try_fold_and_reduce( self, identity: impl Fn() -> T + Send + Sync, fold_op: impl Fn(T, Result<T, E>) -> Result<T, E> + Send + Sync ) -> Result<T, E>
Implements iter.try_fold().try_reduce()
for rayon::iter::ParallelIterator
,
falling back on Iterator::try_fold
when the multicore
feature flag is
disabled.
The try_fold_and_reduce
function can only be called by a iter with
Result<T, E>
item type because the fold_op
must meet the trait
bounds of both try_fold
and try_reduce
from rayon.
Object Safety§
This trait is not object safe.