bind_state_init

Function bind_state_init 

Source
pub fn bind_state_init<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.

On init the bind closure is called with the state variable, it must set and bind it.