pub struct DerivedCaches {
pub micro_fixed_minutes: Vec<u32>,
pub long_fixed_minutes: Vec<u32>,
pub app_pause_targets_lower: Vec<String>,
pub micro_hints_resolved: Vec<String>,
pub long_hints_resolved: Vec<String>,
}Expand description
Stable, per-settings-load derivations resolved once at load/update time instead of being recomputed on every 1Hz scheduler tick or break fire.
These are pure functions of the owning Settings’ source fields:
rebuild re-derives the whole struct from a Settings, and the
run loop / fire path read the cached vectors directly. The cache is
#[serde(skip)] on Settings (it never hits disk and is rebuilt on
deserialise via the Default it picks up), so adding it doesn’t
change the on-disk shape or the Rust↔TS parity surface.
Fields§
§micro_fixed_minutes: Vec<u32>micro_fixed_times parsed to minutes-since-midnight, with
unparseable entries dropped — the per-tick compare becomes a plain
== now_min instead of re-running parse_hhmm on every string.
long_fixed_minutes: Vec<u32>long_fixed_times parsed the same way.
app_pause_targets_lower: Vec<String>app_pause_list targets pre-lowercased so the per-refresh process
scan only has to lowercase the live process name once, instead of
re-lowercasing every configured target for every running process.
Empty targets are dropped (they never match).
micro_hints_resolved: Vec<String>Micro-break hint pool already resolved for the active
micro_hint_mix (see effective_micro_hints). Resolving the mix
concatenates two pools on every break fire otherwise; caching it
turns the fire path into a single clone of the finished vector.
long_hints_resolved: Vec<String>Long-break hint pool resolved for the active long_hint_mix.
Implementations§
Trait Implementations§
Source§impl Clone for DerivedCaches
impl Clone for DerivedCaches
Source§fn clone(&self) -> DerivedCaches
fn clone(&self) -> DerivedCaches
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DerivedCaches
impl Debug for DerivedCaches
Source§impl Default for DerivedCaches
impl Default for DerivedCaches
Source§fn default() -> DerivedCaches
fn default() -> DerivedCaches
Auto Trait Implementations§
impl Freeze for DerivedCaches
impl RefUnwindSafe for DerivedCaches
impl Send for DerivedCaches
impl Sync for DerivedCaches
impl Unpin for DerivedCaches
impl UnsafeUnpin for DerivedCaches
impl UnwindSafe for DerivedCaches
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more