use crate::config::Config;
use crate::output::lines::Line as OutputLine;
use std::fmt::Debug;
use std::path::Path;
#[expect(
clippy::module_name_repetitions,
reason = "CommandReport is the canonical name"
)]
pub trait CommandReport: Debug + Default {
fn render(&self) -> Vec<OutputLine>;
fn exit_code(&self) -> i32 {
0
}
}
pub trait Command {
type Report: CommandReport;
type Error: std::error::Error;
fn run(
&self,
repo_root: &Path,
config: Config,
on_progress: &mut dyn FnMut(&str),
) -> Result<Self::Report, Self::Error>;
}