Skip to main content

o_/
args.rs

1use clap::Parser;
2use clap::Subcommand;
3
4#[derive(Parser, Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
5pub struct Args {
6    #[command(subcommand)]
7    pub command: Commands,
8}
9
10#[derive(Subcommand, Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
11pub enum Commands {
12    Run {
13        path: String,
14    },
15    Toolchain {
16        #[command(subcommand)]
17        command: ToolChainCommand,
18    },
19    Install {
20        #[arg(short, long)]
21        global: bool,
22        package: Option<String>,
23    },
24    Uninstall {
25        name: String,
26    },
27    Job {
28        name: String,
29    },
30}
31
32#[derive(Subcommand, Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
33pub enum ToolChainCommand {
34    Add { user: String, repo: String },
35    Remove { toolchain: String },
36}