Module watcher

Module watcher 

Source
Expand description

State change watchers with predicate-based triggering.

A WatcherRegistry holds named Watchers that observe specific state keys and fire async actions when a WatchPredicate matches a state diff.

The registry is evaluated by the control-lane processor after each mutation cycle. It returns two sets of futures: blocking (awaited sequentially on the control lane) and concurrent (spawned via tokio::spawn).

Structs§

Watcher
A single state watcher: observes one key, fires an async action when the predicate matches.
WatcherRegistry
Registry of state watchers, evaluated after each mutation cycle.

Enums§

WatchPredicate
Condition under which a watcher fires, evaluated against (old, new) values.

Type Aliases§

PredicateFn
Custom predicate function type for state change watchers.