pub struct BreakEvent {Show 14 fields
pub kind: BreakKind,
pub duration_secs: u64,
pub enforceable: bool,
pub manual_finish: bool,
pub postpone_available: bool,
pub skip_available: bool,
pub hints: Vec<String>,
pub hint_rotate_seconds: u64,
pub health_intensity: f32,
pub routine_steps: Vec<RoutineStep>,
pub routine_pacing: Option<RoutinePacing>,
pub routine_max_step_secs: Option<u64>,
pub routine_breath: Option<BreathPattern>,
pub chore_prompt: Option<String>,
}Expand description
Payload emitted to the renderer when a break starts.
Captures everything the overlay needs to render itself without re-querying the backend: duration, whether the user can dismiss or postpone, the hint pool, and the “health intensity” used for the skip-vignette effect.
routine_steps is the resolved guided-routine sequence for this break
(empty when the user has not selected a routine for this kind, in which
case the overlay falls back to plain hint rotation).
routine_pacing carries the routine’s own declared RoutinePacing
when set; the renderer falls back to the global routine_fill setting
when this is None.
routine_max_step_secs caps individual step durations when
routine_pacing is fill and scaling would exceed this limit (the
overlay falls back to loop behaviour for the remainder in that case).
chore_prompt is the day’s user-entered chore the overlay nudges during
a long break (None for micro / bedtime, and for long breaks when the
list is empty); it occupies the wellness-hint space in place of a random
tip.
Fields§
§kind: BreakKind§duration_secs: u64§enforceable: bool§manual_finish: bool§postpone_available: bool§skip_available: bool§hints: Vec<String>§hint_rotate_seconds: u64§health_intensity: f32§routine_steps: Vec<RoutineStep>§routine_pacing: Option<RoutinePacing>§routine_max_step_secs: Option<u64>§routine_breath: Option<BreathPattern>The resolved routine’s breathing pattern, if it carries one. The
overlay animates the ring to it and shows phase labels in place of
step text. None for non-breathing routines.
chore_prompt: Option<String>Trait Implementations§
Source§impl Clone for BreakEvent
impl Clone for BreakEvent
Source§fn clone(&self) -> BreakEvent
fn clone(&self) -> BreakEvent
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 BreakEvent
impl Debug for BreakEvent
Auto Trait Implementations§
impl Freeze for BreakEvent
impl RefUnwindSafe for BreakEvent
impl Send for BreakEvent
impl Sync for BreakEvent
impl Unpin for BreakEvent
impl UnsafeUnpin for BreakEvent
impl UnwindSafe for BreakEvent
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