soroban_cli/commands/snapshot/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use clap::Parser;

use super::global;

pub mod create;

/// Create and operate on ledger snapshots.
#[derive(Debug, Parser)]
pub enum Cmd {
    Create(create::Cmd),
}

#[derive(thiserror::Error, Debug)]
pub enum Error {
    #[error(transparent)]
    Create(#[from] create::Error),
}

impl Cmd {
    pub async fn run(&self, global_args: &global::Args) -> Result<(), Error> {
        match self {
            Cmd::Create(cmd) => cmd.run(global_args).await?,
        };
        Ok(())
    }
}