Module prelude

Module prelude 

Source
Expand description

Prelude for convenient imports

Macros§

reducer_compose
Compose a reducer by routing actions to focused handlers.

Structs§

ActionLoggerConfig
Configuration for action logging with glob pattern filtering.
ActionLoggerMiddleware
Middleware that logs actions with configurable pattern filtering.
ComposedMiddleware
Compose multiple middleware into a single middleware
DebugFreeze
Debug freeze state for capturing and inspecting UI frames
DebugTableBuilder
Builder for constructing debug tables
DispatchResult
Result of dispatching an action to an effect-aware store.
DispatchRuntime
Runtime helper for simple stores (no effects).
EffectContext
Context passed to effect handlers.
EffectRuntime
Runtime helper for effect-based stores.
EffectStore
A store that supports effect-emitting reducers.
EffectStoreWithMiddleware
An effect store with middleware support.
Event
An event with its context
EventBus
Event bus that manages subscriptions and dispatches events
EventContext
Context passed with every event
EventOutcome
Result of mapping an event into actions plus an optional render hint.
Frame
A consistent view into the terminal state for rendering a single frame.
Keybindings
Keybindings configuration with context support
Line
A line of text, consisting of one or more Spans.
LoggingMiddleware
Middleware that logs actions (for debugging)
Modifier
Modifier changes the way a piece of text is displayed.
NoopMiddleware
A no-op middleware that does nothing
NumericComponentId
A simple numeric component ID for basic use cases
PollerConfig
Configuration for the event poller.
Rect
A Rectangular area.
RenderContext
Context passed to render closures.
Span
Represents a part of a line that is contiguous and where all characters share the same style.
Store
Centralized state store with Redux-like reducer pattern
StoreWithMiddleware
Store with middleware support
Style
Style lets you control the main characteristics of the displayed elements.
Text
A string split over one or more lines.

Enums§

Color
ANSI Color
DebugOverlay
Type of debug overlay
EventKind
The actual event payload
EventType
Event types that components can subscribe to
RawEvent
Raw event from crossterm before processing

Traits§

Action
Marker trait for actions that can be dispatched to the store
ActionCategory
Extension trait for actions with category support
ActionParams
Trait for getting action parameters without the variant name.
BindingContext
Trait for user-defined keybinding contexts
Component
A pure UI component that renders based on props and emits actions
ComponentId
Trait for user-defined component identifiers
DispatchStore
Store interface used by DispatchRuntime.
EffectStoreLike
Effect store interface used by EffectRuntime.
Middleware
Middleware trait for intercepting actions

Functions§

format_key_for_display
Format a key string for display (e.g., “ctrl+p” -> “^P”, “q” -> “q”, “tab” -> “Tab”)
parse_key_string
Parse a key string like “q”, “esc”, “ctrl+p”, “shift+tab” into a KeyEvent
process_raw_event
Process a raw event into an EventKind
spawn_event_poller
Spawn the event polling task with cancellation support

Type Aliases§

EffectReducer
A reducer function that can emit effects.
Reducer
A reducer function that handles actions and mutates state

Derive Macros§

Action
Derive macro for the Action trait
BindingContext
Derive macro for the BindingContext trait
ComponentId
Derive macro for the ComponentId trait
DebugState
Derive macro for the DebugState trait
FeatureFlags
Derive macro for the FeatureFlags trait