pub fn update_state(&mut self, state: &mut LayoutState, timer: &Snapshot<'_>) {
        let settings = &self.settings;

        state.components.truncate(self.components.len());
        let mut components = self.components.iter_mut();
        // First update all the states that we have.
        for (state, component) in state.components.iter_mut().zip(components.by_ref()) {
            component.update_state(state, timer, settings);
        }
        // Then add states for all the components that don't have states yet.
        state
            .components
            .extend(components.map(|c| c.state(timer, settings)));

        state.timer_font.clone_from(&settings.timer_font);
        state.times_font.clone_from(&settings.times_font);
        state.text_font.clone_from(&settings.text_font);

        state.background = settings.background;
        state.thin_separators_color = settings.thin_separators_color;
        state.separators_color = settings.separators_color;
        state.text_color = settings.text_color;
        state.direction = settings.direction;
    }
/// Updates the layout's state based on the timer provided. You can use this
/// to visualize all of the components of a layout.
Updates the layout's state based on the timer provided. You can use this
to visualize all of the components of a layout.
Updates the layout ' s state based on the timer provided . You can use this to visualize all of the components of a layout .
pub fn update_state(&mut self, state: &mut LayoutState, timer: &Snapshot<'_>) {
        let settings = &self.settings;
        state.components.truncate(self.components.len());
        let mut components = self.components.iter_mut();
        // First update all the states that we have.
        for (state, component) in state.components.iter_mut().zip(components.by_ref()) {
            component.update_state(state, timer, settings);
        }
        // Then add states for all the components that don't have states yet.
        state
            .components
            .extend(components.map(|c| c.state(timer, settings)));
        state.timer_font.clone_from(&settings.timer_font);
        state.times_font.clone_from(&settings.times_font);
        state.text_font.clone_from(&settings.text_font);
        state.background = settings.background;
        state.thin_separators_color = settings.thin_separators_color;
        state.separators_color = settings.separators_color;
        state.text_color = settings.text_color;
        state.direction = settings.direction;
    }
pub fn update_state ( & mut self , state : & mut LayoutState , timer : & Snapshot < ' _ > ) { let settings = & self . settings ; state . components . truncate ( self . components . len ( ) ) ; let mut components = self . components . iter_mut ( ) ; // First update all the states that we have. for ( state , component ) in state . components . iter_mut ( ) . zip ( components . by_ref ( ) ) { component . update_state ( state , timer , settings ) ; } // Then add states for all the components that don't have states yet. state . components . extend ( components . map ( | c | c . state ( timer , settings ) ) ) ; state . timer_font . clone_from ( & settings . timer_font ) ; state . times_font . clone_from ( & settings . times_font ) ; state . text_font . clone_from ( & settings . text_font ) ; state . background = settings . background ; state . thin_separators_color = settings . thin_separators_color ; state . separators_color = settings . separators_color ; state . text_color = settings . text_color ; state . direction = settings . direction ; }
Updates the layout's state based on the timer provided.
Updates the layout ' s state based on the timer provided .
&mut self
state
&mut LayoutState
timer
&Snapshot<'_>
&mut self
state
&mut LayoutState
timer
&Snapshot<'_>