Struct cfg_rs::ConfigContext [−][src]
pub struct ConfigContext<'a> { /* fields omitted */ }Expand description
Configuration Context.
Configuration context contains current level of config key and configuration instance. It is designed for parsing partial config by partial key and default value.
Implementations
pub fn parse_config<T: FromConfig>(
&mut self,
partial_key: &'a str,
default_value: Option<ConfigValue<'_>>
) -> Result<T, ConfigError>
pub fn parse_config<T: FromConfig>(
&mut self,
partial_key: &'a str,
default_value: Option<ConfigValue<'_>>
) -> Result<T, ConfigError>
Parse partial config by partial key and default value.
Get current key in context.