Skip to main content

bind_state_info

Function bind_state_info 

Source
pub fn bind_state_info<T>(
    child: impl IntoUiNode,
    state: impl IntoVar<T>,
    bind: impl FnMut(&Var<T>) -> VarHandle + Send + 'static,
) -> UiNode
where T: VarValue,
Expand description

Helper for declaring state properties that are controlled by a variable that can only be derived from the widget info.

On info init (first update after the window info tree builds) the bind closure is called with the state variable, it must set and bind it.