1use crate::{CommandGroup, Runnable};
2use clap::Parser;
3
4mod cancel;
5mod start;
6mod status;
7
8pub use self::{cancel::*, start::*, status::*};
9
10#[derive(Parser, Debug)]
16#[allow(clippy::doc_markdown)]
17#[clap(arg_required_else_help = true)]
18pub struct ReplaceCommand {
19 #[clap(subcommand)]
20 pub subcommand: ReplaceSubcommand,
21}
22
23impl CommandGroup for ReplaceCommand {
24 fn leaf(&self) -> &dyn Runnable {
25 match &self.subcommand {
26 ReplaceSubcommand::Start(cmd) => cmd,
27 ReplaceSubcommand::Status(cmd) => cmd,
28 ReplaceSubcommand::Cancel(cmd) => cmd,
29 }
30 }
31}
32
33#[derive(Parser, Debug)]
34pub enum ReplaceSubcommand {
35 Start(ReplaceStartCommand),
36 Status(ReplaceStatusCommand),
37 Cancel(ReplaceCancelCommand),
38}