Lines Matching +full:source +full:- +full:map
7 use crate::map::Map;
12 pub trait Source: Debug { interface
13 fn clone_into_box(&self) -> Box<dyn Source + Send + Sync>; in clone_into_box()
15 /// Collect all configuration properties available from this source and return
16 /// a Map.
17 fn collect(&self) -> Result<Map<String, Value>>; in collect()
20 fn collect_to(&self, cache: &mut Value) -> Result<()> { in collect_to()
47 /// For those reasons, it is left to other crates to implement runtime-specific or proprietary
55 … // Sync is supertrait due to https://docs.rs/async-trait/0.1.50/async_trait/index.html#dyn-traits
57 /// Collects all configuration properties available from this source and return
58 /// a Map as an async operations.
59 async fn collect(&self) -> Result<Map<String, Value>>; in collect()
62 async fn collect_to(&self, cache: &mut Value) -> Result<()> { in collect_to()
73 fn clone(&self) -> Self { in clone()
78 impl Clone for Box<dyn Source + Send + Sync> {
79 fn clone(&self) -> Self { in clone()
84 impl Source for Vec<Box<dyn Source + Send + Sync>> {
85 fn clone_into_box(&self) -> Box<dyn Source + Send + Sync> { in clone_into_box()
89 fn collect(&self) -> Result<Map<String, Value>> { in collect()
90 let mut cache: Value = Map::<String, Value>::new().into(); in collect()
92 for source in self { in collect()
93 source.collect_to(&mut cache)?; in collect()
104 impl Source for [Box<dyn Source + Send + Sync>] { impl
105 fn clone_into_box(&self) -> Box<dyn Source + Send + Sync> { in clone_into_box()
109 fn collect(&self) -> Result<Map<String, Value>> { in collect()
110 let mut cache: Value = Map::<String, Value>::new().into(); in collect()
112 for source in self { in collect()
113 source.collect_to(&mut cache)?; in collect()
124 impl<T> Source for Vec<T>
126 T: Source + Sync + Send + Clone + 'static,
128 fn clone_into_box(&self) -> Box<dyn Source + Send + Sync> { in clone_into_box()
132 fn collect(&self) -> Result<Map<String, Value>> { in collect()
133 let mut cache: Value = Map::<String, Value>::new().into(); in collect()
135 for source in self { in collect()
136 source.collect_to(&mut cache)?; in collect()