soroban_cli/commands/ledger/entry/mod.rs
1use clap::Parser;
2pub mod fetch;
3
4#[derive(Debug, Parser)]
5pub enum Cmd {
6 /// Fetch ledger entries. This command supports all types of ledger entries supported by the RPC.
7 /// Read more about the RPC command here: [https://developers.stellar.org/docs/data/apis/rpc/api-reference/methods/getLedgerEntries#types-of-ledgerkeys](https://developers.stellar.org/docs/data/apis/rpc/api-reference/methods/getLedgerEntries#types-of-ledgerkeys)
8 #[command(subcommand)]
9 Fetch(fetch::Cmd),
10}
11
12#[derive(thiserror::Error, Debug)]
13pub enum Error {
14 #[error(transparent)]
15 Fetch(#[from] fetch::Error),
16}
17
18impl Cmd {
19 pub async fn run(&self) -> Result<(), Error> {
20 match self {
21 Cmd::Fetch(cmd) => cmd.run().await?,
22 }
23 Ok(())
24 }
25}