Expand description
Interactive state binding for reactive UI.
This module provides mechanisms to bind UI widget properties to application state, enabling declarative data flow and automatic UI updates.
§Binding Types
Binding<T>- Two-way binding for read/write accessDerived<T>- Read-only computed value from statePropertyPath- Path to a property in state (e.g., “user.name”)
§Example
ⓘ
use presentar_core::binding::{Binding, Derived, PropertyPath};
// Create a binding to state.count
let count_binding = Binding::new(|| state.count, |v| state.count = v);
// Create a derived value
let doubled = Derived::new(|| state.count * 2);Structs§
- Active
Binding - An active binding between state and widget.
- Binding
Config - A binding configuration for connecting state to widget properties.
- Binding
Expression - A binding expression that can be evaluated against state.
- Binding
Id - Unique binding identifier.
- Binding
Manager - Manages bindings between application state and widget properties.
- Bool
ToString Converter - Boolean to string converter.
- Computed
- A computed value derived from other reactive sources.
- Conversion
Error - Error during value conversion.
- Event
Binding - Event binding that maps widget events to state messages.
- Identity
Converter - Identity converter (no conversion).
- Number
Format Converter - Number formatter converter.
- Pending
Update - A pending update to be applied.
- Property
Path - A property path for accessing nested state.
- Reactive
Cell - A reactive cell that holds a value and notifies on changes.
- State
Update - Update to apply to state.
- Widget
Update - Update to apply to a widget.
Enums§
- Action
Binding - Action binding for state updates.
- Binding
Direction - Binding direction for property connections.
- Update
Source - Source of a binding update.
Traits§
- Bindable
- Trait for types that can be bound to state.
- Value
Converter - Converts values between different types for binding.