tasks_rs/
args.rs

1use crate::TaskStatus;
2use clap::Args;
3
4#[derive(Args, Clone, Copy)]
5pub struct GetArgs {
6    /// Only list the tasks with the specified statusc
7    #[arg(long, short)]
8    pub status: Option<TaskStatus>,
9}
10
11#[derive(Args)]
12pub struct AddArgs {
13    /// The content of the task
14    pub content: String,
15    /// The status of the task
16    #[arg(default_value_t, long, short, value_enum)]
17    pub status: TaskStatus,
18}
19
20#[derive(Args)]
21pub struct EditArgs {
22    /// The ID of the task to edit
23    pub id: u16,
24    /// The content of the task
25    pub content: Option<String>,
26    /// The status of the task
27    #[arg(long, short)]
28    pub status: Option<TaskStatus>,
29}
30
31#[derive(Args)]
32pub struct RemoveArgs {
33    /// The ID of the task to remove
34    pub id: u16,
35}