use anyhow::Result;
use clap::Subcommand;
pub(crate) mod contribute;
mod output;
pub(crate) mod record_case;
pub(crate) mod record_profile;
mod target_selection;
pub(crate) mod verify;
#[derive(Debug, Subcommand)]
pub enum FixtureCmd {
Contribute(contribute::ContributeArgs),
#[command(subcommand)]
Record(FixtureRecordCmd),
Verify(verify::VerifyArgs),
}
impl FixtureCmd {
pub async fn run(self) -> Result<()> {
match self {
Self::Contribute(args) => contribute::run(args).await,
Self::Record(command) => command.run().await,
Self::Verify(args) => verify::run(&args),
}
}
}
#[derive(Debug, Subcommand)]
pub enum FixtureRecordCmd {
Case(record_case::RecordCaseArgs),
Profile(record_profile::RecordProfileArgs),
}
impl FixtureRecordCmd {
async fn run(self) -> Result<()> {
match self {
Self::Case(args) => record_case::run(args).await,
Self::Profile(args) => record_profile::run(args).await,
}
}
}