pub struct TaskSet { /* private fields */ }Implementations§
Source§impl TaskSet
impl TaskSet
Sourcepub fn display_by_next(&mut self, ctx: &Query, truncate: bool) -> Result<()>
pub fn display_by_next(&mut self, ctx: &Query, truncate: bool) -> Result<()>
Displays tasks in “next” view (by priority and creation date)
Sourcepub fn render_json(&self) -> Result<()>
pub fn render_json(&self) -> Result<()>
Renders tasks as JSON
Sourcepub fn render_table(&self, truncate: bool) -> Result<()>
pub fn render_table(&self, truncate: bool) -> Result<()>
Renders tasks as a table
Sourcepub fn display_by_week(&mut self) -> Result<()>
pub fn display_by_week(&mut self) -> Result<()>
Displays tasks grouped by week (for show-resolved)
Sourcepub fn display_projects(&self) -> Result<()>
pub fn display_projects(&self) -> Result<()>
Displays projects
Source§impl TaskSet
impl TaskSet
pub fn new(repo_path: PathBuf, ids_file_path: PathBuf) -> Self
Sourcepub fn load(
repo_path: &Path,
ids_file_path: &Path,
include_resolved: bool,
) -> Result<Self>
pub fn load( repo_path: &Path, ids_file_path: &Path, include_resolved: bool, ) -> Result<Self>
Loads tasks from the repository
Sourcepub fn assign_ids(&mut self) -> Result<()>
pub fn assign_ids(&mut self) -> Result<()>
Assigns IDs to tasks
Sourcepub fn save_pending_changes(&mut self) -> Result<()>
pub fn save_pending_changes(&mut self) -> Result<()>
Saves all pending changes
Sourcepub fn get_by_id_mut(&mut self, id: i32) -> Option<&mut Task>
pub fn get_by_id_mut(&mut self, id: i32) -> Option<&mut Task>
Gets a mutable task by ID
Sourcepub fn get_by_uuid(&self, uuid: &str) -> Option<&Task>
pub fn get_by_uuid(&self, uuid: &str) -> Option<&Task>
Gets a task by UUID
Sourcepub fn update_task(&mut self, task: Task) -> Result<()>
pub fn update_task(&mut self, task: Task) -> Result<()>
Updates an existing task
Sourcepub fn sort_by_created_ascending(&mut self)
pub fn sort_by_created_ascending(&mut self)
Sorts tasks by creation date (then by ID for stability)
pub fn sort_by_created_descending(&mut self)
Sourcepub fn sort_by_priority_ascending(&mut self)
pub fn sort_by_priority_ascending(&mut self)
Sorts tasks by priority (P0 > P1 > P2 > P3)
pub fn sort_by_priority_descending(&mut self)
Sourcepub fn sort_by_resolved_ascending(&mut self)
pub fn sort_by_resolved_ascending(&mut self)
Sorts tasks by resolved date
pub fn sort_by_resolved_descending(&mut self)
Sourcepub fn filter_by_status(&mut self, status: &str)
pub fn filter_by_status(&mut self, status: &str)
Filters to show only specified status
Sourcepub fn filter_organised(&mut self)
pub fn filter_organised(&mut self)
Filters to show only organized tasks (with tags or project)
Sourcepub fn filter_unorganised(&mut self)
pub fn filter_unorganised(&mut self)
Filters to show only unorganized tasks
Gets all tags in use
Sourcepub fn get_projects(&self) -> Vec<Project>
pub fn get_projects(&self) -> Vec<Project>
Gets all projects with statistics
Sourcepub fn must_get_by_id(&self, id: i32) -> &Task
pub fn must_get_by_id(&self, id: i32) -> &Task
Gets a task by ID, panics if not found
Sourcepub fn must_load_task(&mut self, task: Task) -> Result<Task>
pub fn must_load_task(&mut self, task: Task) -> Result<Task>
Loads a task into the set, returns the loaded task, panics on error
Sourcepub fn must_update_task(&mut self, task: Task) -> Result<()>
pub fn must_update_task(&mut self, task: Task) -> Result<()>
Updates a task, panics on error
Sourcepub fn apply_modifications(&mut self, query: &Query) -> Result<()>
pub fn apply_modifications(&mut self, query: &Query) -> Result<()>
Apply modifications from a query to filtered tasks
Sourcepub fn delete_task(&mut self, uuid: &str) -> Result<()>
pub fn delete_task(&mut self, uuid: &str) -> Result<()>
Delete a task by UUID