Skip to main content

Module subscription

Module subscription 

Source
Expand description

Subscription system for continuous event sources.

Subscriptions provide a declarative way to receive events from external sources like timers, file watchers, or network connections. The runtime manages subscription lifecycles automatically based on what the model declares as active.

§How it works

  1. Model::subscriptions() returns the set of active subscriptions
  2. After each update(), the runtime compares active vs previous subscriptions
  3. New subscriptions are started, removed ones are stopped
  4. Subscription messages are routed through Model::update()

Structs§

Every
A subscription that fires at a fixed interval.
StopSignal
Signal for stopping a subscription.

Traits§

Subscription
A subscription produces messages from an external event source.

Type Aliases§

SubId
A unique identifier for a subscription.