soroban_cli/commands/ledger/
mod.rs

1use crate::commands::global;
2use clap::Subcommand;
3mod latest;
4
5#[derive(Debug, Subcommand)]
6pub enum Cmd {
7    /// Get the latest ledger sequence and information from the network
8    Latest(latest::Cmd),
9}
10
11#[derive(thiserror::Error, Debug)]
12pub enum Error {
13    #[error(transparent)]
14    Latest(#[from] latest::Error),
15}
16
17impl Cmd {
18    pub async fn run(&self, global_args: &global::Args) -> Result<(), Error> {
19        match &self {
20            Cmd::Latest(cmd) => cmd.run(global_args).await?,
21        }
22        Ok(())
23    }
24}