pub struct ChoresSnapshot {
pub date: String,
pub items: Vec<String>,
pub rotation: u64,
pub prompted_date: String,
pub ever_used_chores: bool,
}Expand description
The day’s “chore post-it” as persisted to chores.json.
date is the local day (YYYY-MM-DD) the list was entered; a stale date
means the list belongs to a previous day and is dropped on load (see
crate::scheduler::chores::ChoresState::from_snapshot). rotation
advances each time a chore is surfaced so consecutive long breaks suggest
different tasks rather than always the first one.
Fields§
§date: String§items: Vec<String>§rotation: u64§prompted_date: StringLocal day (YYYY-MM-DD) the morning chore prompt last fired, so a
restart mid-morning doesn’t re-prompt. Empty until the first prompt;
a value != date means we haven’t prompted today yet. Defaults empty
on older stores that predate the field.
ever_used_chores: boolTrue once the user has ever saved a non-empty chore list. Unlike
items (which reset each morning), this persists across days, so the
morning prompt only nudges people who actually use chores — a
permanently-empty list no longer pops Preferences every work-day
(#251-adjacent annoyance). Defaults false on older stores; a store that
already has items is migrated to true on load.
Trait Implementations§
Source§impl Clone for ChoresSnapshot
impl Clone for ChoresSnapshot
Source§fn clone(&self) -> ChoresSnapshot
fn clone(&self) -> ChoresSnapshot
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 ChoresSnapshot
impl Debug for ChoresSnapshot
Source§impl Default for ChoresSnapshot
impl Default for ChoresSnapshot
Source§fn default() -> ChoresSnapshot
fn default() -> ChoresSnapshot
Source§impl<'de> Deserialize<'de> for ChoresSnapshotwhere
ChoresSnapshot: Default,
impl<'de> Deserialize<'de> for ChoresSnapshotwhere
ChoresSnapshot: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ChoresSnapshot
Source§impl PartialEq for ChoresSnapshot
impl PartialEq for ChoresSnapshot
Source§impl Serialize for ChoresSnapshot
impl Serialize for ChoresSnapshot
impl StructuralPartialEq for ChoresSnapshot
Auto Trait Implementations§
impl Freeze for ChoresSnapshot
impl RefUnwindSafe for ChoresSnapshot
impl Send for ChoresSnapshot
impl Sync for ChoresSnapshot
impl Unpin for ChoresSnapshot
impl UnsafeUnpin for ChoresSnapshot
impl UnwindSafe for ChoresSnapshot
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<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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