pub trait ModuleConfig: Default {
// Required methods
fn load_config(path: impl AsRef<Path>) -> Result<Self, Error>
where Self: Sized;
fn config_map(&self) -> HashMap<String, String>;
}Expand description
Config types that can be loaded and converted to context map.
Use impl_module_config!(ConfigType) to implement by delegating to inherent load and to_context_map.
Required Methods§
fn load_config(path: impl AsRef<Path>) -> Result<Self, Error>where
Self: Sized,
Sourcefn config_map(&self) -> HashMap<String, String>
fn config_map(&self) -> HashMap<String, String>
Return config as key-value map for ModuleContext. Delegates to inherent to_context_map via macro.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.