Expand description
Reducer trait implementations.
Reducers are the deterministic fan-in point of the recursive runtime: when a
superstep runs several active nodes — including parallel branches or a node
that merged results from a subgraph or sub-agent — the executor folds their
updates back into one committed state through a reducer, in deterministic
active-set order, so merged state is reproducible regardless of completion
order. This module supplies the built-in channel/state reducers and the
closure-backed escape hatches; see [types] for the trait and marker
definitions.
Structs§
- Append
Reducer - Appends the update vector onto the current vector.
- Closure
Reducer - A custom binary
Reducerbacked by a closure. - Closure
State Reducer - A custom
StateReducerbacked by a closure. - MaxReducer
- Keeps the larger of the two values.
- MinReducer
- Keeps the smaller of the two values.
- Overwrite
Reducer - Overwrites the current value with the update (last-value semantics).
- Overwrite
State Reducer - A
StateReducerthat overwrites whole state with the update (the default forState == Updategraphs). - SetUnion
Reducer - Unions the update vector into the current vector, skipping duplicates and preserving first-seen order.
Traits§
- Reducer
- Merges two values of the same channel type.
- State
Reducer - Merges a partial
Updateinto the whole graphState.