Function build_active_filter

Source
pub fn build_active_filter<T: LastActiveTs>(
    timer: impl SystemTimer,
    active_duration: Duration,
) -> impl Fn(&T) -> bool
Expand description

Builds a filter closure that checks whether a LastActiveTs item is still within the specified active duration, relative to the current time provided by the given SystemTimer.

The returned closure uses the timestamp at the time of building, so the “now” reference point is fixed when this function is called.