summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 0ff2601..f890461 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -190,3 +190,13 @@ impl Config {
self.get(key).and_then(Value::into_array)
}
}
+
+impl Source for Config {
+ fn clone_into_box(&self) -> Box<Source + Send + Sync> {
+ Box::new((*self).clone())
+ }
+
+ fn collect(&self) -> Result<HashMap<String, Value>> {
+ self.cache.clone().into_table()
+ }
+}