hermes_cli/commands/query/channel/
mod.rs

1mod client;
2mod end;
3mod ends;
4
5pub use client::QueryChannelClient;
6pub use end::QueryChannelEnd;
7pub use ends::QueryChannelEnds;
8use hermes_cli_framework::command::CommandRunner;
9use hermes_cli_framework::output::Output;
10
11use crate::contexts::app::HermesApp;
12use crate::Result;
13
14#[derive(Debug, clap::Subcommand)]
15pub enum QueryChannel {
16    End(QueryChannelEnd),
17    Ends(QueryChannelEnds),
18    Client(QueryChannelClient),
19}
20
21impl QueryChannel {
22    pub async fn run(&self, app: &HermesApp) -> Result<Output> {
23        match self {
24            Self::End(cmd) => cmd.run(app).await,
25            Self::Ends(cmd) => cmd.run(app).await,
26            Self::Client(cmd) => cmd.run(app).await,
27        }
28    }
29}