pub trait ConfigValueType {
type Value;
// Required methods
fn from_conf(conf: &ConfigValue) -> Result<Self::Value, ConfigError>;
fn into_config_value(value: Self::Value) -> ConfigValue;
// Provided method
fn config_string(value: Self::Value) -> String { ... }
}Expand description
A value extractor for config values.
Required Associated Types§
Required Methods§
Sourcefn from_conf(conf: &ConfigValue) -> Result<Self::Value, ConfigError>
fn from_conf(conf: &ConfigValue) -> Result<Self::Value, ConfigError>
Extract the value from a config instance.
Sourcefn into_config_value(value: Self::Value) -> ConfigValue
fn into_config_value(value: Self::Value) -> ConfigValue
Convert a runtime value into a config value.
Provided Methods§
Sourcefn config_string(value: Self::Value) -> String
fn config_string(value: Self::Value) -> String
Produce a TOML fragment for the value.
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.