pub fn within<'a, A: Send + Sync + 'a>(
        mut parse_time: impl FnMut(&A) -> Option<DateTime<FixedOffset>> + Clone + Send + Sync + 'a,
        duration: Duration,
        formula: Formula<'a, A>,
    ) -> Formula<'a, A> {
        examine(move |entry: &A| {
            if let Some(begin) = parse_time(entry) {
                release(
                    formula.clone(),
                    examine({
                        let copy = formula.clone();
                        let mut parse_time = parse_time.clone();
                        move |entry: &A| {
                            if let Some(now) = parse_time(entry) {
                                if now.signed_duration_since(begin) < duration {
                                    top()
                                } else {
                                    bottom(&format!(
                                "Formula {:#?} failed to match within {} (actual time: {} - {} = {})",
                                copy, duration, now, begin, now.signed_duration_since(begin)
                            ))
                                }
                            } else {
                                top()
                            }
                        }
                    }),
                )
            } else {
                top()
            }
        })
    }
/// True if the current entry contains a time value, and `formula` holds
/// true across all further entries up to `duration`, based on their time
/// values.
True if the current entry contains a time value, and `formula` holds
true across all further entries up to `duration`, based on their time
values.
True if the current entry contains a time value and ` formula ` holds true across all further entries up to ` duration ` based on their time values .
pub fn within<'a, A: Send + Sync + 'a>(
        mut parse_time: impl FnMut(&A) -> Option<DateTime<FixedOffset>> + Clone + Send + Sync + 'a,
        duration: Duration,
        formula: Formula<'a, A>,
    ) -> Formula<'a, A> {
        examine(move |entry: &A| {
            if let Some(begin) = parse_time(entry) {
                release(
                    formula.clone(),
                    examine({
                        let copy = formula.clone();
                        let mut parse_time = parse_time.clone();
                        move |entry: &A| {
                            if let Some(now) = parse_time(entry) {
                                if now.signed_duration_since(begin) < duration {
                                    top()
                                } else {
                                    bottom(&format!(
                                "Formula {:#?} failed to match within {} (actual time: {} - {} = {})",
                                copy, duration, now, begin, now.signed_duration_since(begin)
                            ))
                                }
                            } else {
                                top()
                            }
                        }
                    }),
                )
            } else {
                top()
            }
        })
    }
pub fn within < ' a , A : Send + Sync + ' a > ( mut parse_time : impl FnMut ( & A ) -> Option < DateTime < FixedOffset > > + Clone + Send + Sync + ' a , duration : Duration , formula : Formula < ' a , A > , ) -> Formula < ' a , A > { examine ( move | entry : & A | { if let Some ( begin ) = parse_time ( entry ) { release ( formula . clone ( ) , examine ( { let copy = formula . clone ( ) ; let mut parse_time = parse_time . clone ( ) ; move | entry : & A | { if let Some ( now ) = parse_time ( entry ) { if now . signed_duration_since ( begin ) < duration { top ( ) } else { bottom ( & format ! ( " " copy duration now begin now signed_duration_since ( begin ) ) ) } } else { top ( ) } } } ) , ) } else { top ( ) } } ) }
True if the current entry contains a time value, and `formula` holds
true across all further entries up to `duration`, based on their time
values.
True if the current entry contains a time value and ` formula ` holds true across all further entries up to ` duration ` based on their time values .
parse_time
impl FnMut(&A) -> Option<DateTime<FixedOffset>> + Clone + Send + Sync + 'a
duration
Duration
formula
Formula<'a, A>
parse_time
impl FnMut(&A) -> Option<DateTime<FixedOffset>> + Clone + Send + Sync + 'a
duration
Duration
formula
Formula<'a, A>