reactive_graph/all/
args.rs1#[cfg(feature = "client")]
2use crate::client::args::ClientArguments;
3#[cfg(feature = "server")]
4use crate::server::args::ServerArguments;
5use crate::shared::args::SharedArguments;
6#[cfg(feature = "tooling")]
7use crate::tooling::args::ToolingArguments;
8#[cfg(feature = "client")]
9use clap::ArgAction;
10use clap::Parser;
11
12#[derive(Parser, Debug)]
13#[command(name = "reactive-graph", author, version, about, long_about = None)]
14#[command(propagate_version = true)]
15pub struct AllInOneArguments {
16 #[clap(flatten)]
17 pub shared: SharedArguments,
18
19 #[cfg(feature = "server")]
20 #[clap(flatten)]
21 pub server: ServerArguments,
22
23 #[cfg(feature = "client")]
24 #[clap(flatten)]
25 pub client: ClientArguments,
26
27 #[cfg(feature = "client")]
29 #[clap(short = 'i', long, action=ArgAction::SetTrue)]
30 pub interactive: Option<bool>,
31
32 #[cfg(feature = "tooling")]
33 #[clap(flatten)]
34 pub tooling: ToolingArguments,
35}
36
37#[cfg(test)]
40mod tests {
41 use super::*;
42 use crate::shared::completions::print_shell_completions;
43 use clap::CommandFactory;
44 use clap_complete::Shell;
45
46 #[test]
47 fn test_print_completions() {
48 let mut cmd = AllInOneArguments::command();
49 print_shell_completions(Shell::Zsh, &mut cmd);
50 }
51
52 #[test]
53 fn test_print_markdown_help() {
54 clap_markdown::print_help_markdown::<AllInOneArguments>();
55 }
56}