cargo_deps/
config.rs

1/// Configuration options.
2///
3/// Create this object with `Default::default()` for the configuration equivalent to running without
4/// any command-line arguments.
5///
6/// Please refer to the help menu for information about each option.
7#[derive(Clone, Debug)]
8#[allow(missing_docs)]
9pub struct Config {
10    pub depth: Option<usize>,
11    pub dot_file: Option<String>,
12    pub filter: Option<Vec<String>>,
13    pub exclude: Option<Vec<String>>,
14    pub include_orphans: bool,
15    pub include_versions: bool,
16    /// Default: "Cargo.toml".
17    pub manifest_path: String,
18    pub subgraph: Option<Vec<String>>,
19    pub subgraph_name: Option<String>,
20    pub registries: Option<Vec<String>>,
21
22    /// Default: true.
23    pub regular_deps: bool,
24    /// Default: false.
25    pub build_deps: bool,
26    /// Default: false.
27    pub dev_deps: bool,
28    /// Default: false.
29    pub optional_deps: bool,
30    /// Default: true.
31    pub transitive_deps: bool,
32}
33
34impl Default for Config {
35    fn default() -> Self {
36        Self {
37            depth: None,
38            dot_file: None,
39            filter: None,
40            exclude: None,
41            include_orphans: false,
42            include_versions: false,
43            manifest_path: "Cargo.toml".into(),
44            subgraph: None,
45            subgraph_name: None,
46            registries: None,
47
48            regular_deps: true,
49            build_deps: false,
50            dev_deps: false,
51            optional_deps: false,
52            transitive_deps: true,
53        }
54    }
55}