use crate::mjolnir_lib::MjolnirError;
use clap::Parser;
use thiserror::Error;
mod batch;
mod standard;
#[derive(Parser, Debug)]
pub enum FragmentLoadCommand {
#[clap(subcommand)]
Batch(batch::Batch),
#[clap(subcommand)]
Standard(standard::Standard),
}
#[derive(Error, Debug)]
pub enum FragmentLoadCommandError {
#[error("Client Error")]
ClientError(#[from] MjolnirError),
}
impl FragmentLoadCommand {
pub fn exec(&self) -> Result<(), MjolnirError> {
match self {
FragmentLoadCommand::Batch(batch) => batch.exec(),
FragmentLoadCommand::Standard(standard) => standard.exec(),
}
}
}