1use clap::{Parser, ValueEnum};
2
3#[derive(Copy, Clone, Debug, ValueEnum)]
5pub enum GraphType {
6 Mermaid,
8 Dot,
10 Json,
12}
13
14impl GraphType {
15 pub fn file_extension(self) -> &'static str {
17 match self {
18 GraphType::Mermaid => "mmd",
19 GraphType::Dot => "dot",
20 GraphType::Json => "json",
21 }
22 }
23}
24
25#[derive(Parser, Debug, Default)]
27pub struct GraphConfig {
28 #[clap(long)]
30 pub graph: Option<GraphType>,
31
32 #[clap(long, short = 'o')]
34 pub output: Option<String>,
35
36 #[clap(long)]
38 pub long_labels: bool,
39
40 #[clap(long)]
42 pub no_metadata: bool,
43}