cli: export data and add helper functions for accessing data
This commit is contained in:
parent
8fc4a4653b
commit
8d4a1fa45e
1 changed files with 10 additions and 2 deletions
12
src/cli.rs
12
src/cli.rs
|
@ -8,7 +8,7 @@ struct ConfigBase {
|
|||
|
||||
pub struct ModuleConfig {
|
||||
base : ConfigBase,
|
||||
load : bool,
|
||||
pub load : bool,
|
||||
}
|
||||
|
||||
impl ModuleConfig {
|
||||
|
@ -25,7 +25,7 @@ impl ModuleConfig {
|
|||
|
||||
pub struct Config {
|
||||
base : ConfigBase,
|
||||
module_configs : Vec<ModuleConfig>,
|
||||
pub module_configs : Vec<ModuleConfig>,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
|
@ -38,6 +38,14 @@ impl Config {
|
|||
module_configs: vec![],
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_verbose(&self) -> bool {
|
||||
self.base.verbosity
|
||||
}
|
||||
|
||||
pub fn is_debugging(&self) -> bool {
|
||||
self.base.debugging
|
||||
}
|
||||
}
|
||||
|
||||
pub fn configure(config : &mut Config) {
|
||||
|
|
Loading…
Reference in a new issue