pub struct TaskList {
pub tasks: Vec<Task>,
pub last_updated: DateTime<Utc>,
}
Expand description
Represents a list of tasks for a specification with tracking metadata.
A TaskList
contains all tasks associated with a particular specification
along with metadata about when the list was last updated. This provides
a complete view of work items and their current state.
§Fields
tasks
- Vector of all tasks in the specificationlast_updated
- Timestamp of the most recent modification to any task
§Examples
use project_manager_mcp::models::task::{TaskList, Task, TaskStatus, TaskPriority};
use chrono::Utc;
// Create a task list for a feature specification
let task_list = TaskList {
tasks: vec![
Task {
id: "task_001".to_string(),
title: "Design user interface".to_string(),
description: "Create mockups and wireframes".to_string(),
status: TaskStatus::Completed,
priority: TaskPriority::Medium,
dependencies: vec![],
created_at: Utc::now(),
updated_at: Utc::now(),
},
Task {
id: "task_002".to_string(),
title: "Implement API endpoints".to_string(),
description: "Create REST API for user management".to_string(),
status: TaskStatus::InProgress,
priority: TaskPriority::High,
dependencies: vec!["task_001".to_string()],
created_at: Utc::now(),
updated_at: Utc::now(),
},
],
last_updated: Utc::now(),
};
// Check task progress
let total_tasks = task_list.tasks.len();
let completed_tasks = task_list.tasks.iter()
.filter(|t| t.status == TaskStatus::Completed)
.count();
println!("Progress: {}/{} tasks completed", completed_tasks, total_tasks);
Fields§
§tasks: Vec<Task>
Vector of all tasks in the specification
last_updated: DateTime<Utc>
Timestamp of the most recent modification to any task
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TaskList
impl<'de> Deserialize<'de> for TaskList
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TaskList
impl RefUnwindSafe for TaskList
impl Send for TaskList
impl Sync for TaskList
impl Unpin for TaskList
impl UnwindSafe for TaskList
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