1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
pub mod version;

use clap::Subcommand;

use super::GeneralArgs;

/// API subcommands
#[derive(Debug, Subcommand)]
pub enum ApiArgs {
    Version(version::ApiVersionArgs),
}

impl ApiArgs {
    pub async fn run(self, general_args: GeneralArgs) -> anyhow::Result<()> {
        match self {
            ApiArgs::Version(args) => args.run(general_args).await,
        }
    }
}