pub struct AppState {Show 23 fields
pub day_data: DayData,
pub current_date: Date,
pub mode: AppMode,
pub selected_index: usize,
pub edit_field: EditField,
pub input_buffer: String,
pub time_cursor: usize,
pub should_quit: bool,
pub visual_start: usize,
pub visual_end: usize,
pub command_palette_input: String,
pub command_palette_selected: usize,
pub available_commands: Vec<Command>,
pub date_changed: bool,
pub calendar_selected_date: Date,
pub calendar_view_month: Month,
pub calendar_view_year: i32,
pub config: Config,
pub theme: Theme,
pub last_error_message: Option<String>,
pub task_picker_selected: usize,
pub active_timer: Option<TimerState>,
pub last_file_modified: Option<SystemTime>,
/* private fields */
}Fields§
§day_data: DayData§current_date: Date§mode: AppMode§selected_index: usize§edit_field: EditField§input_buffer: String§time_cursor: usize§should_quit: bool§visual_start: usize§visual_end: usize§command_palette_input: String§command_palette_selected: usize§available_commands: Vec<Command>§date_changed: bool§calendar_selected_date: Date§calendar_view_month: Month§calendar_view_year: i32§config: Config§theme: Theme§last_error_message: Option<String>§task_picker_selected: usize§active_timer: Option<TimerState>§last_file_modified: Option<SystemTime>Implementations§
Source§impl AppState
impl AppState
pub fn new(day_data: DayData) -> Self
pub fn get_selected_record(&self) -> Option<&WorkRecord>
pub fn show_project_column(&self) -> bool
pub fn show_customer_column(&self) -> bool
pub fn show_description_column(&self) -> bool
pub fn visible_edit_fields(&self) -> Vec<EditField>
pub fn move_selection_up(&mut self)
pub fn move_selection_down(&mut self)
pub fn enter_edit_mode(&mut self)
pub fn change_task_name(&mut self)
pub fn exit_edit_mode(&mut self)
pub fn next_field(&mut self)
pub fn handle_char_input(&mut self, c: char)
pub fn handle_backspace(&mut self)
pub fn save_edit(&mut self) -> Result<(), String>
pub fn add_new_record(&mut self)
pub fn add_break(&mut self)
pub fn delete_selected_record(&mut self)
pub fn move_field_left(&mut self)
pub fn move_field_right(&mut self)
pub fn set_current_time_on_field(&mut self)
pub fn enter_visual_mode(&mut self)
pub fn exit_visual_mode(&mut self)
pub fn is_in_visual_selection(&self, index: usize) -> bool
pub fn delete_visual_selection(&mut self)
pub fn undo(&mut self)
pub fn redo(&mut self)
pub fn open_command_palette(&mut self)
pub fn close_command_palette(&mut self)
pub fn handle_command_palette_char(&mut self, c: char)
pub fn handle_command_palette_backspace(&mut self)
pub fn move_command_palette_up(&mut self)
pub fn move_command_palette_down(&mut self, filtered_count: usize)
pub fn get_filtered_commands(&self) -> Vec<(usize, i64, &Command)>
pub fn execute_selected_command(&mut self) -> Option<CommandAction>
pub fn load_new_day_data(&mut self, new_day_data: DayData)
pub fn open_calendar(&mut self)
pub fn close_calendar(&mut self)
pub fn calendar_previous_month(&mut self)
pub fn calendar_next_month(&mut self)
pub fn calendar_select_date(&mut self)
pub fn open_ticket_in_browser(&mut self)
pub fn open_worklog_in_browser(&mut self)
pub fn clear_error(&mut self)
pub fn close_task_picker(&mut self)
pub fn get_unique_task_names(&self) -> Vec<String>
pub fn get_filtered_task_names(&self) -> Vec<String>
pub fn move_task_picker_up(&mut self)
pub fn move_task_picker_down(&mut self, task_count: usize)
pub fn select_task_from_picker(&mut self)
pub fn handle_task_picker_char(&mut self, c: char)
pub fn handle_task_picker_backspace(&mut self)
Sourcepub fn start_timer_for_selected(
&mut self,
storage: &StorageManager,
) -> Result<(), String>
pub fn start_timer_for_selected( &mut self, storage: &StorageManager, ) -> Result<(), String>
Start a new timer with the current selected task
Sourcepub fn stop_active_timer(
&mut self,
storage: &mut StorageManager,
) -> Result<(), String>
pub fn stop_active_timer( &mut self, storage: &mut StorageManager, ) -> Result<(), String>
Stop the active timer and convert to work record
Sourcepub fn pause_active_timer(
&mut self,
storage: &StorageManager,
) -> Result<(), String>
pub fn pause_active_timer( &mut self, storage: &StorageManager, ) -> Result<(), String>
Pause the active timer
Sourcepub fn resume_active_timer(
&mut self,
storage: &StorageManager,
) -> Result<(), String>
pub fn resume_active_timer( &mut self, storage: &StorageManager, ) -> Result<(), String>
Resume a paused timer
Sourcepub fn get_timer_status(&self) -> Option<&TimerState>
pub fn get_timer_status(&self) -> Option<&TimerState>
Get current status of active timer or None if no timer running
Sourcepub fn check_and_reload_if_modified(
&mut self,
storage: &mut StorageManager,
) -> bool
pub fn check_and_reload_if_modified( &mut self, storage: &mut StorageManager, ) -> bool
Check if the data file has been modified externally and reload if needed Returns true if the file was reloaded
Auto Trait Implementations§
impl Freeze for AppState
impl RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
impl UnwindSafe for AppState
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
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>
Converts
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>
Converts
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