pub struct TimerState {Show 15 fields
pub id: Option<u32>,
pub task_name: String,
pub description: Option<String>,
pub project: Option<String>,
pub customer: Option<String>,
pub start_time: OffsetDateTime,
pub end_time: Option<OffsetDateTime>,
pub date: Date,
pub status: TimerStatus,
pub paused_duration_secs: i64,
pub paused_at: Option<OffsetDateTime>,
pub created_at: OffsetDateTime,
pub updated_at: OffsetDateTime,
pub source_record_id: Option<u32>,
pub source_record_date: Option<Date>,
}Expand description
Active timer state with SQLite-ready fields
This struct represents an active timer session. All fields are designed to be compatible with SQLite storage for future migration (Issue #22).
Fields§
§id: Option<u32>Optional ID for future SQLite primary key (currently unused)
task_name: StringTask name being tracked
description: Option<String>Optional description for the task
project: Option<String>Optional project name for grouping/reporting
customer: Option<String>Optional customer name for client-related work
start_time: OffsetDateTimeWhen the timer was started (UTC)
end_time: Option<OffsetDateTime>When the timer was stopped (UTC), None if still active
date: DateDate when timer was started
status: TimerStatusCurrent status of the timer
paused_duration_secs: i64Total duration in seconds when paused (cumulative)
paused_at: Option<OffsetDateTime>When timer was last paused (to track current pause duration)
created_at: OffsetDateTimeWhen this timer record was created (audit field)
updated_at: OffsetDateTimeWhen this timer record was last updated (audit field)
source_record_id: Option<u32>ID of the source work record that this timer was started from If present, stopping the timer will update the existing record instead of creating a new one
source_record_date: Option<Date>Date of the source work record (needed when timer is started from a past/future date view) If present, we’ll update the record in this date’s file instead of the timer start date
Trait Implementations§
Source§impl Clone for TimerState
impl Clone for TimerState
Source§fn clone(&self) -> TimerState
fn clone(&self) -> TimerState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TimerState
impl Debug for TimerState
Source§impl<'de> Deserialize<'de> for TimerState
impl<'de> Deserialize<'de> for TimerState
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>,
Source§impl PartialEq for TimerState
impl PartialEq for TimerState
Source§impl Serialize for TimerState
impl Serialize for TimerState
impl StructuralPartialEq for TimerState
Auto Trait Implementations§
impl Freeze for TimerState
impl RefUnwindSafe for TimerState
impl Send for TimerState
impl Sync for TimerState
impl Unpin for TimerState
impl UnsafeUnpin for TimerState
impl UnwindSafe for TimerState
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,
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