GuiModel

interface GuiModel

The observable, read-only surface of a GuiController: current state plus the two ways it communicates changes to a frontend.

Inheritors

Properties

Link copied to clipboard
abstract val effects: Flow<GuiEffect>

Lossless, ordered, single-consumer requests to the hosting platform.

Link copied to clipboard
abstract val events: SharedFlow<GuiEvent>

Discrete, possibly-missed-if-unsubscribed notifications about what just happened (e.g. for logging/tests) - unlike effects, losing one doesn't break correctness since state always reflects the latest truth.

Link copied to clipboard
abstract val state: StateFlow<GuiState>

The full application state at any point in time; a frontend renders itself from this.