fn extract_sample_and_log(
        &mut self,
        timestamp: SystemTime,
        direction: Direction,
        logger: &slog::Logger,
    ) -> Option<(SystemTime, Self::SampleType)> {
        match self.get_sample_at_timestamp(timestamp, direction) {
            Ok(None) => None,
            Ok(val) => val,
            Err(e) => {
                error!(logger, "{:#}", e.context("Failed to load from store"));
                None
            }
        }
    }
/// Syntactic sugar to extract the value from the store return and log on error
Syntactic sugar to extract the value from the store return and log on error
Syntactic sugar to extract the value from the store return and log on error
fn extract_sample_and_log(
        &mut self,
        timestamp: SystemTime,
        direction: Direction,
        logger: &slog::Logger,
    ) -> Option<(SystemTime, Self::SampleType)> {
        match self.get_sample_at_timestamp(timestamp, direction) {
            Ok(None) => None,
            Ok(val) => val,
            Err(e) => {
                error!(logger, "{:#}", e.context("Failed to load from store"));
                None
            }
        }
    }
fn extract_sample_and_log ( & mut self , timestamp : SystemTime , direction : Direction , logger : & slog :: Logger , ) -> Option < ( SystemTime , Self :: SampleType ) > { match self . get_sample_at_timestamp ( timestamp , direction ) { Ok ( None ) => None , Ok ( val ) => val , Err ( e ) => { error ! ( logger " " e context ( " " ) ) ; None } } }
Syntactic sugar to extract the value from the store return and log on error
Syntactic sugar to extract the value from the store return and log on error
&mut self
timestamp
SystemTime
direction
Direction
logger
&slog::Logger
&mut self
timestamp
SystemTime
direction
Direction
logger
&slog::Logger