pub trait GpuiComponentValueBinding<Value>: GpuiComponentShape{
type Event: 'static;
// Required method
fn value_change(
state: &Self::State,
event: &Self::Event,
) -> ValueChange<Value>;
// Provided method
fn seed_value_binding_state(
_state: &mut Self::State,
_value: Option<&Value>,
_window: &mut Window,
_cx: &mut Context<'_, Self::State>,
) { ... }
}Expand description
Optional value-binding contract for GPUI component shapes.
Required Associated Types§
Required Methods§
Sourcefn value_change(state: &Self::State, event: &Self::Event) -> ValueChange<Value>
fn value_change(state: &Self::State, event: &Self::Event) -> ValueChange<Value>
Convert an emitted component event into a normalized value change.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".