Expand description
Runtime intents dispatched by shortcuts and programmatic callers.
An Intent is the unit of “something wants to happen” in the
action system. It pairs a stable name (the intent string) with an
optional type-erased payload that handlers downcast when they
recognize the intent. Intents are produced by
Shortcuts at activation time, by
widgets via ctx.send_intent, or by programmatic callers.
They dispatch through the widget tree by walking
source-widget → root: each ancestor’s
Action whose intent name matches
gets a chance to consume the intent or propagate it.
§Typed DTOs via IntentKind
Apps that want typo-safe construction and handler-side
exhaustiveness define an enum and implement IntentKind (by
hand or via #[derive(IntentKind)] from teksilo-macros). The
whole variant — including any fields it carries — is stored as
the intent’s payload; handlers recover it via
Intent::payload or IntentKind::from_intent.
Structs§
- Intent
- A runtime intent dispatched through the widget tree.
Enums§
- Intent
Response - Return value of an
Actionhandler. Controls whether the intent keeps bubbling up to ancestor widgets.
Traits§
- Intent
Kind - Typed DTO bridge between an app’s intent enum and the runtime
Intentdispatch type.