pub fn initialize(&mut self) {
        // Only initialize once
        assert!(self.last_sample == None);

        match self.get_next_sample(self.last_sample_time, crate::Direction::Reverse) {
            Ok(Some((timestamp, dataframe))) => {
                self.last_sample = Some(dataframe.sample);
                self.last_sample_time = timestamp;
            }
            Ok(None) => {}
            Err(e) => {
                error!(self.logger, "{:#}", e.context("Failed to load from store"));
            }
        }
    }
// Sets up last_sample and time if any, otherwise nothing is changed
Sets up last_sample and time if any, otherwise nothing is changed
Sets up last_sample and time if any otherwise nothing is changed
pub fn initialize(&mut self) {
        // Only initialize once
        assert!(self.last_sample == None);
        match self.get_next_sample(self.last_sample_time, crate::Direction::Reverse) {
            Ok(Some((timestamp, dataframe))) => {
                self.last_sample = Some(dataframe.sample);
                self.last_sample_time = timestamp;
            }
            Ok(None) => {}
            Err(e) => {
                error!(self.logger, "{:#}", e.context("Failed to load from store"));
            }
        }
    }
pub fn initialize ( & mut self ) { // Only initialize once assert ! ( self last_sample None ) ; match self . get_next_sample ( self . last_sample_time , crate :: Direction :: Reverse ) { Ok ( Some ( ( timestamp , dataframe ) ) ) => { self . last_sample = Some ( dataframe . sample ) ; self . last_sample_time = timestamp ; } Ok ( None ) => { } Err ( e ) => { error ! ( self logger " " e context ( " " ) ) ; } } }
Sets up last_sample and time if any, otherwise nothing is changed
Sets up last_sample and time if any otherwise nothing is changed
&mut self
&mut self