Expand description
Build Elm-style GPUI programs with composable models, commands, and subscriptions.
gpui_tea packages the runtime primitives needed to drive a
The Elm Architecture style application on top of
gpui. The crate exposes:
Modelfor state transitions and renderingProgramfor mounting and running a model inside GPUICommandfor immediate, foreground, and background effectsSubscriptionandSubscriptionsfor long-lived external event sourcesModelContextandChildScopefor nesting child models under explicit paths
Most applications implement Model and mount it with Program::mount() or
ModelExt::into_program().
Structs§
- Child
Path - Identify a model’s position inside a nested program tree.
- Child
Scope - Bridge a child
Modelinto a parent model’s message space. - Command
- Describe work the runtime should perform after a model transition.
- Dispatcher
- Send messages back into a mounted
crate::Program. - Key
- Identify a keyed effect or subscription across reconciliations.
- Model
Context - Carry structural context for a
Modelinvocation. - Program
- Host a mounted
Modelinside the GPUI runtime. - Program
Config - Configure runtime observability hooks and queue behavior.
- Program
Id - Identify a mounted program instance in observability output.
- Runtime
Snapshot - Snapshot runtime bookkeeping for a mounted
Program. - Subscription
- Declare a long-lived external event source for a program.
- Subscription
Context - Expose runtime services while constructing a
Subscription. - Subscriptions
- Collect a set of unique
Subscriptionvalues. - Telemetry
Envelope - Wrap a telemetry event together with its metadata.
- Telemetry
Metadata - Carry metadata emitted with each
TelemetryEvent. - View
- Wrap a GPUI element returned from
crate::Model::view().
Enums§
- Command
Kind - Classify how a
Commandinteracts with the runtime. - Error
- Report runtime and subscription construction failures.
- Queue
Overflow Action - Describe the action taken when a queue reaches capacity.
- Queue
Policy - Define how the runtime handles queue backpressure.
- Runtime
Event - Describe high-level runtime events intended for application observers.
- SubHandle
- Hold the runtime resource that keeps a subscription alive.
- Telemetry
Event - Describe detailed runtime telemetry intended for machine consumption.
Traits§
- Into
View - Convert a GPUI element into a
View. - Model
- Define state, message handling, and rendering for a TEA program.
- Model
Ext - Mount a
Modelas a fully initializedProgram.
Functions§
- observe_
metrics_ telemetry - Record a
TelemetryEnvelopeasmetricscounters and gauges. - observe_
tracing_ telemetry - Record a
TelemetryEnvelopeastracingevents.
Type Aliases§
- Result
- Alias the crate-wide result type.
Derive Macros§
- Composite
- Derive child-model forwarding helpers for a composite model struct.