pub struct BreakKindSettings<'a> {
pub enabled: bool,
pub interval_secs: u64,
pub duration_secs: u64,
pub enforceable: bool,
pub manual_finish: bool,
pub mode: BreakMode,
pub schedule_mode: ScheduleMode,
pub postpone_enabled: bool,
pub skip_enabled: bool,
pub fixed_minutes: &'a [u32],
}Expand description
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.
Borrowing keeps this off the wire entirely: the owning Settings keeps
its flat micro_* / long_* fields and its derived serde, so the
on-disk settings.json shape and the Rust↔TS IPC contract are
unchanged. Only Micro and Long have these paired fields; Sleep has its
own dedicated fields (bedtime_duration_secs, sleep_hints, …) and so
Settings::for_kind returns None for it.
Fields§
§enabled: bool§interval_secs: u64§duration_secs: u64§enforceable: bool§manual_finish: bool§mode: BreakMode§schedule_mode: ScheduleMode§postpone_enabled: boolWhether postpone is enabled for this kind, before the global
postpone_enabled / strict_mode gates are applied. Use
Settings::postpone_available_for for the fully-resolved value.
skip_enabled: boolWhether the overlay skip (dismiss) control is enabled for this
kind, before the enforceable / strict gate. Use
Settings::skip_available_for for the fully-resolved value.
fixed_minutes: &'a [u32]The pre-parsed fixed-time minutes for this kind (see
DerivedCaches).
Trait Implementations§
Source§impl<'a> Clone for BreakKindSettings<'a>
impl<'a> Clone for BreakKindSettings<'a>
Source§fn clone(&self) -> BreakKindSettings<'a>
fn clone(&self) -> BreakKindSettings<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for BreakKindSettings<'a>
Auto Trait Implementations§
impl<'a> Freeze for BreakKindSettings<'a>
impl<'a> RefUnwindSafe for BreakKindSettings<'a>
impl<'a> Send for BreakKindSettings<'a>
impl<'a> Sync for BreakKindSettings<'a>
impl<'a> Unpin for BreakKindSettings<'a>
impl<'a> UnsafeUnpin for BreakKindSettings<'a>
impl<'a> UnwindSafe for BreakKindSettings<'a>
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