pub trait CommReducer {
type Update;
// Required method
fn reduce(
&self,
left: Self::Update,
right: Self::Update,
) -> Result<Self::Update>;
}
Expand description
Commutative reducer for an accumulator. This is used to coallesce updates. For example, if the accumulator is a sum, its reducer calculates and returns the sum of 2 updates. This is helpful in split ports, where a large number of updates can be reduced into a smaller number of updates before being sent to the parent port.