Module local_state
Expand description
Small, typed process-local state for retained application views.
Durable/shareable values belong in the app’s Automerge document. This handle is for presentation state that should survive between widget events without becoming part of persistence, collaboration, or undo history.
Structs§
- Intents
- The queue a view’s controls write what they ask for to, and its app applies in one ordered place after the event: a click, a key and an accessibility action all become the same intent. Clones share the queue.
- Latest
Request - UI-thread inbox for worker results where only the newest request may win.
- Latest
Task - Typed state for restartable background work where only the latest run may
publish a result. Starting or cancelling a run invalidates every older
TaskCompletion. - Local
State - A cloneable handle to typed, process-local application state.
- Local
State Writer - A background-safe
LocalStatemutation handle with event-loop wakeup. - Request
Completion - Single-use worker capability returned by
LatestRequest::begin. - Task
Completion - A single-use capability returned by
LatestTask::begin. - Wake
Handle - Captures one scope, or remains detached forever. Unlike a closed scope, detached execution may publish local/headless state without waking a host.