pub struct BreakTimers {Show 13 fields
pub last_micro: Instant,
pub last_long: Instant,
pub last_sleep: Option<Instant>,
pub micro_warned: bool,
pub long_warned: bool,
pub active_break: Option<BreakKind>,
pub micro_deferred_since: Option<Instant>,
pub long_deferred_since: Option<Instant>,
pub micro_postpone_count: u32,
pub long_postpone_count: u32,
pub last_skipped_or_postponed: Option<(BreakKind, Instant)>,
pub last_micro_fixed_fire: Option<(String, u32)>,
pub last_long_fixed_fire: Option<(String, u32)>,
}Expand description
All of the scheduler’s per-tick mutable timing state.
Held behind a tokio::Mutex inside Scheduler. Every field tracks
either when something last happened (last_*) or where we are in
a per-kind state machine (warned, deferred-since, postpone counter).
Fields§
§last_micro: Instant§last_long: Instant§last_sleep: Option<Instant>§micro_warned: bool§long_warned: bool§active_break: Option<BreakKind>§micro_deferred_since: Option<Instant>§long_deferred_since: Option<Instant>§micro_postpone_count: u32§long_postpone_count: u32§last_skipped_or_postponed: Option<(BreakKind, Instant)>§last_micro_fixed_fire: Option<(String, u32)>(local-date, minute-of-day) of the most recent fixed-time micro
fire. Keyed by date so the dedupe survives DST transitions: a
“fall back” 02:00 → 01:00 reuses the same minute on the same day,
and “spring forward” never strands the dedupe pointing at a minute
that no longer exists on the wall clock.
last_long_fixed_fire: Option<(String, u32)>Implementations§
Source§impl BreakTimers
impl BreakTimers
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BreakTimers
impl RefUnwindSafe for BreakTimers
impl Send for BreakTimers
impl Sync for BreakTimers
impl Unpin for BreakTimers
impl UnsafeUnpin for BreakTimers
impl UnwindSafe for BreakTimers
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
Mutably borrows from an owned value. Read more