pub trait MapAggregateOps<T, R>: Sized{
type Output;
// Required method
fn map_aggregate<'a, A, FMap, FAggr>(
&self,
argument: A,
map: &FMap,
aggregate: &FAggr,
) -> Self::Output
where A: Sync + Copy + Send,
FMap: Fn(T, usize, A) -> R + 'a + Sync,
FAggr: Fn(R, R) -> R + 'a + Sync + Send;
}
Expand description
Operations which allow to iterate over the vector and to derive results.
Required Associated Types§
Required Methods§
Sourcefn map_aggregate<'a, A, FMap, FAggr>(
&self,
argument: A,
map: &FMap,
aggregate: &FAggr,
) -> Self::Output
fn map_aggregate<'a, A, FMap, FAggr>( &self, argument: A, map: &FMap, aggregate: &FAggr, ) -> Self::Output
Transforms all vector elements using the function map
and then aggregates
all the results with aggregate
. aggregate
must be a commutativity and associativity;
that’s because there is no guarantee that the numbers will
be aggregated in any deterministic order.
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.