reactive_graph_tooling/shared/output_format/mod.rs
1use clap::Parser;
2pub use render_table::*;
3use serde::Serialize;
4
5pub mod render_table;
6
7#[derive(clap::ValueEnum, Default, Debug, Clone, Serialize)]
8pub enum OutputFormatArgs {
9 // The output is formatted as a table.
10 #[default]
11 Table,
12 // The output is formatted as a HTML table.
13 HtmlTable,
14 // The output is formatted as a Markdown table.
15 MarkdownTable,
16 // Shows the count.
17 Count,
18 // The output is returned as JSON.
19 Json,
20 // The output is returned as JSON5.
21 Json5,
22 // The output is returned as TOML.
23 Toml,
24}
25
26#[derive(Parser, Debug)]
27pub struct OutputFormatArgsOptional {
28 /// The output format.
29 #[arg(long)]
30 pub output_format: Option<OutputFormatArgs>,
31}