vrtb_core/format.rs
1use clap::ValueEnum;
2
3// Output format for comparison results. Lives in core (rather than the CLI) so
4// the engine-agnostic conformance logic can render diffs without core depending
5// on the CLI crate — the CLI re-exports it as its clap arg type.
6#[derive(Clone, Copy, Debug, ValueEnum)]
7pub enum Format {
8 Human,
9 Summary,
10 Json,
11 Jsonl,
12}
13
14impl std::fmt::Display for Format {
15 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16 let s = match self {
17 Format::Human => "human",
18 Format::Summary => "summary",
19 Format::Json => "json",
20 Format::Jsonl => "jsonl",
21 };
22 write!(f, "{s}")
23 }
24}