A borrowed, per-kind view over the micro_* / long_* field pairs of
a Settings. Built by Settings::for_kind to collapse the
match kind { Micro => s.micro_x, Long => s.long_x, … } ladders that
recur across scheduler/ into a single s.for_kind(kind)?.x read.
Per-break-kind audio configuration: mode + which bundled sound to play.
sound_id is the numeric id from src/assets/sounds/credits.json, or
the literal "custom" to use custom_path (a Supporter-pack feature).
How a break surfaces to the user, per break kind
(micro_break_mode / long_break_mode). Maps 1:1 onto the runtime
BreakDelivery enum via BreakMode::delivery; the split exists
because Sleep hard-codes Overlay and never reads a BreakMode.
Which hint pool a break kind draws from. Micro mixes physical and
psychological; long mixes solo and social; Both concatenates
the kind’s two pools. The vocabularies don’t overlap, so one enum
covers both kinds — effective_*_hints only ever asks “is this the
mix, or one of my two pools?”.
Which scheduling strategy fires a break kind
(micro_schedule_mode / long_schedule_mode). Interval is the
repeating timer, Fixed is wall-clock times, Both runs them
together. Sleep has no interval/fixed split and never reads this.
Every weekday enabled (0b111_1111). The default for work_days_mask,
so a settings.json written before the field existed loads as
“work window applies on all seven days” — preserving the prior
behaviour where the work window had no day-of-week distinction.
Deserialise a *_routine_categories filter list permissively: unknown
entries are dropped (each with a logged warning) instead of failing the
whole profile load (#212). A wholly malformed value (not an array of
strings) degrades to an empty list rather than failing the load — matching
the difficulty handler’s tolerance. An empty result still means “all
categories”.
Deserialise a *_routine_max_difficulty permissively: an unknown or
wrong-typed value (stale, hand-edited, or from a future build) falls back
to RoutineDifficulty::default rather than failing the whole profile
load (#212). Shares the deserialize_with_fallback helper with the
other tolerant settings enums; kept as a field-level deserialize_with
(not a type-level Deserialize impl) so content packs still parse
routines through the strict derived Deserialize.
Deserialise a lowercase-tagged enum permissively: read the raw string
and map it through parse, falling back to T::default() with a
single logged warning on any unknown/corrupt value.
Pure resolver for the long-break hint pool, honouring long_hint_mix.
Solo / Social filter to that pool; anything else (including
Both) concatenates them in solo-then-social order. Cached by
DerivedCaches.
Pure resolver for the micro-break hint pool, honouring
micro_hint_mix. Physical / Psychological return only that pool;
anything else (including Both) concatenates both in
physical-then-psychological order. This does the allocating /
concatenating work; DerivedCaches caches its result so the fire
path doesn’t repeat it.
Resolve the windowed-overlay size fraction for a break kind: the
per-kind override when set, otherwise the global windowed_fraction.
The result is clamped to [0.1, 1.0] (matching
crate::scheduler::overlay::centered_windowed_rect) so a corrupt on-disk value can’t size the
overlay off-screen. Sleep has no override and falls back to the global
value (it never renders windowed anyway).