pub struct WindowDefinition {
pub name: String,
pub timezone: String,
pub allow: Vec<WindowSpan>,
pub exclude: Vec<String>,
pub on_outside: String,
pub loc: Loc,
pub leading_trivia: Vec<Trivia>,
pub trailing_trivia: Vec<Trivia>,
}Expand description
v2.27.0 — a temporal execution-window guard. Where shield guards the
CONTENT of an emission and anchor guards its TRUTH, window guards its
TIMING: whether a scheduled (cron) tick runs, by timezone-aware day/hour
windows. The runtime decision (is_in_window) lands in v2.27.0; the daemon
binding + the defer ledger in v2.27.0.
Fields§
§name: String§timezone: StringIANA timezone ("America/Bogota"). Format-checked at compile time
(v2.27.0); full IANA membership validated by the runtime (v2.27.0, chrono-tz).
allow: Vec<WindowSpan>The allowed day/hour spans (at least one). A tick inside ANY span runs.
exclude: Vec<String>v2.27.0 — excluded dates (holidays): ISO YYYY-MM-DD date-string
literals (exclude: [ "2026-12-25", "2026-01-01" ]). A tick whose local
date (in timezone) is in this set is OUTSIDE the window regardless of the
hour spans. The dates are LITERAL — part of the verified program, so the
decision stays a pure, replayable function of (now, the window, the tz-db version) (the time_is_an_explicit_input doctrine). Empty ⇒ no holidays.
on_outside: StringWhat to do when a tick falls OUTSIDE every allowed span:
skip | defer | warn (closed catalog).
loc: Loc§leading_trivia: Vec<Trivia>§trailing_trivia: Vec<Trivia>