soroban_cli/commands/contract/
bindings.rspub mod json;
pub mod python;
pub mod rust;
pub mod typescript;
#[derive(Debug, clap::Subcommand)]
pub enum Cmd {
Json(json::Cmd),
Rust(rust::Cmd),
Typescript(typescript::Cmd),
Python(python::Cmd),
}
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error(transparent)]
Json(#[from] json::Error),
#[error(transparent)]
Rust(#[from] rust::Error),
#[error(transparent)]
Typescript(#[from] typescript::Error),
#[error(transparent)]
Python(#[from] python::Error),
}
impl Cmd {
pub async fn run(&self) -> Result<(), Error> {
match &self {
Cmd::Json(json) => json.run()?,
Cmd::Rust(rust) => rust.run()?,
Cmd::Typescript(ts) => ts.run().await?,
Cmd::Python(python) => python.run()?,
}
Ok(())
}
}