fn create_lifetime<T: resources::Resource + Clone + PartialEq>(state: &Binding<T>, widget_manager: &WidgetManager, id: Index) -> Box<dyn Releasable> {
        let dirty_nodes = widget_manager.dirty_nodes.clone();
        state.when_changed(crate::notify(move || {
            if let Ok(mut dirty_nodes) = dirty_nodes.lock() {
                dirty_nodes.insert(id);
            }
        }))
    }
/// Create a `Releasable` lifetime that marks the current node as dirty when the given state changes
Create a `Releasable` lifetime that marks the current node as dirty when the given state changes
Create a ` Releasable ` lifetime that marks the current node as dirty when the given state changes
fn create_lifetime<T: resources::Resource + Clone + PartialEq>(state: &Binding<T>, widget_manager: &WidgetManager, id: Index) -> Box<dyn Releasable> {
        let dirty_nodes = widget_manager.dirty_nodes.clone();
        state.when_changed(crate::notify(move || {
            if let Ok(mut dirty_nodes) = dirty_nodes.lock() {
                dirty_nodes.insert(id);
            }
        }))
    }
fn create_lifetime < T : resources :: Resource + Clone + PartialEq > ( state : & Binding < T > , widget_manager : & WidgetManager , id : Index ) -> Box < dyn Releasable > { let dirty_nodes = widget_manager . dirty_nodes . clone ( ) ; state . when_changed ( crate :: notify ( move | | { if let Ok ( mut dirty_nodes ) = dirty_nodes . lock ( ) { dirty_nodes . insert ( id ) ; } } ) ) }
Create a `Releasable` lifetime that marks the current node as dirty when the given state changes
Create a ` Releasable ` lifetime that marks the current node as dirty when the given state changes
state
&Binding<T>
widget_manager
&WidgetManager
id
Index
state
&Binding<T>
widget_manager
&WidgetManager
id
Index