json_to_usv/app/
args.rs

1//! Args for the application.
2//!
3//! These args correspond to the matches in the file `clap.rs`.
4//! We have these args in their own file in order to be flexible,
5//! such as being able to start our app with other arg parsers.
6
7use std::default::Default;
8use usv::style::Style;
9
10#[derive(Debug)]
11pub struct Args {
12
13    /// Test flag that sets whether the app prints diagnostics.
14    /// Example: true means print diagnostics.
15    pub(crate) test: bool,
16
17    /// Log level: 0=none, 1=error, 2=warn, 3=info, 4=debug, 5=trace.
18    /// Example: 5 means print debug diagnostics.
19    pub(crate) log_level: Option<::log::Level>,
20
21    /// USV Style
22    /// Example: separator strings
23    pub(crate) style: Style,
24}
25
26impl<'a> Default for Args {
27    fn default() -> Args {
28        Args {
29            test: false,
30            log_level: None,
31            style: Style::default(),
32        }
33    }
34}