hermes_cli/commands/bootstrap/
subcommand.rs

1use hermes_cli_components::traits::command::{CanRunCommand, CommandRunner};
2
3use crate::commands::bootstrap::chain::BootstrapChainArgs;
4
5#[derive(Debug, clap::Subcommand)]
6pub enum BootstrapSubCommand {
7    /// Query the state of a client
8    Chain(BootstrapChainArgs),
9}
10
11pub struct RunBootstrapSubCommand;
12
13impl<App> CommandRunner<App, BootstrapSubCommand> for RunBootstrapSubCommand
14where
15    App: CanRunCommand<BootstrapChainArgs>,
16{
17    async fn run_command(
18        app: &App,
19        subcommand: &BootstrapSubCommand,
20    ) -> Result<App::Output, App::Error> {
21        match subcommand {
22            BootstrapSubCommand::Chain(args) => app.run_command(args).await,
23        }
24    }
25}