pub fn process_data_updates(&mut self) {
        let mut observers: Vec<Entity> = Vec::new();

        for entity in self.tree.into_iter() {
            if let Some(model_store) = self.data.get_mut(entity) {
                for (_, model) in model_store.data.iter() {
                    for lens in model_store.lenses_dup.iter_mut() {
                        if lens.update(model) {
                            observers.extend(lens.observers().iter())
                        }
                    }

                    for (_, lens) in model_store.lenses_dedup.iter_mut() {
                        if lens.update(model) {
                            observers.extend(lens.observers().iter());
                        }
                    }
                }

                for lens in model_store.lenses_dup.iter_mut() {
                    if let Some(view_handler) = self.views.get(&entity) {
                        if lens.update_view(view_handler) {
                            observers.extend(lens.observers().iter())
                        }
                    }
                }

                for (_, lens) in model_store.lenses_dedup.iter_mut() {
                    if let Some(view_handler) = self.views.get(&entity) {
                        if lens.update_view(view_handler) {
                            observers.extend(lens.observers().iter())
                        }
                    }
                }
            }
        }

        for img in self.resource_manager.images.values_mut() {
            if img.dirty {
                observers.extend(img.observers.iter());
                img.dirty = false;
            }
        }

        for observer in observers.iter() {
            if let Some(mut view) = self.views.remove(observer) {
                let prev = self.current;
                self.current = *observer;
                view.body(self);
                self.current = prev;
                self.views.insert(*observer, view);
            }
        }
    }
/// For each binding or data observer, check if its data has changed, and if so, rerun its
/// builder/body.
For each binding or data observer, check if its data has changed, and if so, rerun its
builder/body.
For each binding or data observer check if its data has changed and if so rerun its builder / body .
pub fn process_data_updates(&mut self) {
        let mut observers: Vec<Entity> = Vec::new();
        for entity in self.tree.into_iter() {
            if let Some(model_store) = self.data.get_mut(entity) {
                for (_, model) in model_store.data.iter() {
                    for lens in model_store.lenses_dup.iter_mut() {
                        if lens.update(model) {
                            observers.extend(lens.observers().iter())
                        }
                    }
                    for (_, lens) in model_store.lenses_dedup.iter_mut() {
                        if lens.update(model) {
                            observers.extend(lens.observers().iter());
                        }
                    }
                }
                for lens in model_store.lenses_dup.iter_mut() {
                    if let Some(view_handler) = self.views.get(&entity) {
                        if lens.update_view(view_handler) {
                            observers.extend(lens.observers().iter())
                        }
                    }
                }
                for (_, lens) in model_store.lenses_dedup.iter_mut() {
                    if let Some(view_handler) = self.views.get(&entity) {
                        if lens.update_view(view_handler) {
                            observers.extend(lens.observers().iter())
                        }
                    }
                }
            }
        }
        for img in self.resource_manager.images.values_mut() {
            if img.dirty {
                observers.extend(img.observers.iter());
                img.dirty = false;
            }
        }
        for observer in observers.iter() {
            if let Some(mut view) = self.views.remove(observer) {
                let prev = self.current;
                self.current = *observer;
                view.body(self);
                self.current = prev;
                self.views.insert(*observer, view);
            }
        }
    }
pub fn process_data_updates ( & mut self ) { let mut observers : Vec < Entity > = Vec :: new ( ) ; for entity in self . tree . into_iter ( ) { if let Some ( model_store ) = self . data . get_mut ( entity ) { for ( _ , model ) in model_store . data . iter ( ) { for lens in model_store . lenses_dup . iter_mut ( ) { if lens . update ( model ) { observers . extend ( lens . observers ( ) . iter ( ) ) } } for ( _ , lens ) in model_store . lenses_dedup . iter_mut ( ) { if lens . update ( model ) { observers . extend ( lens . observers ( ) . iter ( ) ) ; } } } for lens in model_store . lenses_dup . iter_mut ( ) { if let Some ( view_handler ) = self . views . get ( & entity ) { if lens . update_view ( view_handler ) { observers . extend ( lens . observers ( ) . iter ( ) ) } } } for ( _ , lens ) in model_store . lenses_dedup . iter_mut ( ) { if let Some ( view_handler ) = self . views . get ( & entity ) { if lens . update_view ( view_handler ) { observers . extend ( lens . observers ( ) . iter ( ) ) } } } } } for img in self . resource_manager . images . values_mut ( ) { if img . dirty { observers . extend ( img . observers . iter ( ) ) ; img . dirty = false ; } } for observer in observers . iter ( ) { if let Some ( mut view ) = self . views . remove ( observer ) { let prev = self . current ; self . current = * observer ; view . body ( self ) ; self . current = prev ; self . views . insert ( * observer , view ) ; } } }
For each binding or data observer, check if its data has changed, and if so, rerun its
builder/body.
For each binding or data observer check if its data has changed and if so rerun its builder / body .
&mut self