cli: export data and add helper functions for accessing data

This commit is contained in:
Matthias Beyer 2015-10-18 20:52:35 +02:00
parent 8fc4a4653b
commit 8d4a1fa45e

View file

@ -8,7 +8,7 @@ struct ConfigBase {
pub struct ModuleConfig { pub struct ModuleConfig {
base : ConfigBase, base : ConfigBase,
load : bool, pub load : bool,
} }
impl ModuleConfig { impl ModuleConfig {
@ -25,7 +25,7 @@ impl ModuleConfig {
pub struct Config { pub struct Config {
base : ConfigBase, base : ConfigBase,
module_configs : Vec<ModuleConfig>, pub module_configs : Vec<ModuleConfig>,
} }
impl Config { impl Config {
@ -38,6 +38,14 @@ impl Config {
module_configs: vec![], 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) { pub fn configure(config : &mut Config) {