Module binding

Module binding 

Source
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 access
  • Derived<T> - Read-only computed value from state
  • PropertyPath - 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§

ActiveBinding
An active binding between state and widget.
BindingConfig
A binding configuration for connecting state to widget properties.
BindingExpression
A binding expression that can be evaluated against state.
BindingId
Unique binding identifier.
BindingManager
Manages bindings between application state and widget properties.
BoolToStringConverter
Boolean to string converter.
Computed
A computed value derived from other reactive sources.
ConversionError
Error during value conversion.
EventBinding
Event binding that maps widget events to state messages.
IdentityConverter
Identity converter (no conversion).
NumberFormatConverter
Number formatter converter.
PendingUpdate
A pending update to be applied.
PropertyPath
A property path for accessing nested state.
ReactiveCell
A reactive cell that holds a value and notifies on changes.
StateUpdate
Update to apply to state.
WidgetUpdate
Update to apply to a widget.

Enums§

ActionBinding
Action binding for state updates.
BindingDirection
Binding direction for property connections.
UpdateSource
Source of a binding update.

Traits§

Bindable
Trait for types that can be bound to state.
ValueConverter
Converts values between different types for binding.