summaryrefslogtreecommitdiffstats
path: root/src/module.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/module.rs')
-rw-r--r--src/module.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/module.rs b/src/module.rs
index af985ea3a..526345b95 100644
--- a/src/module.rs
+++ b/src/module.rs
@@ -99,6 +99,16 @@ impl<'a> Module<'a> {
fn config_value(&self, key: &str) -> Option<&str> {
self.config.and_then(|config| config.get_as_str(key))
}
+
+ /// Get a module's config value as an int
+ pub fn config_value_i64(&self, key: &str) -> Option<i64> {
+ self.config.and_then(|config| config.get_as_i64(key))
+ }
+
+ /// Get a module's config value as a bool
+ pub fn config_value_bool(&self, key: &str) -> Option<bool> {
+ self.config.and_then(|config| config.get_as_bool(key))
+ }
}
impl<'a> fmt::Display for Module<'a> {