Expand description
Main event loop implementation.
This module contains the core orchestrate-handle-reduce cycle that drives the reducer-based pipeline. The event loop coordinates pure reducer logic with impure effect handlers, maintaining strict separation of concerns.
§Event Loop Cycle
State → Orchestrate → Effect → Handle → Event → Reduce → Next State
(pure) (impure) (pure)The loop continues until reaching a terminal state (Interrupted, Completed) or until max iterations is exceeded.
§Architecture
The event loop is organized into several modules:
driver- Main iteration loop implementing orchestrate→handle→reduce cyclerecovery- Defensive completion and max iterations handlingerror_handling- Panic recovery and error routingtrace- Trace buffer and diagnostic dumpsconfig- Configuration and initialization
Traits§
- Stateful
Handler - Trait for handlers that maintain internal state.
Functions§
- run_
event_ loop - Run the main event loop for the reducer-based pipeline.
- run_
event_ loop_ with_ handler - Run the event loop with a custom effect handler.