Function dprint_core::configuration::get_nullable_value

source ·
pub fn get_nullable_value<T>(
    config: &mut ConfigKeyMap,
    key: &str,
    diagnostics: &mut Vec<ConfigurationDiagnostic>
) -> Option<T>
where T: FromStr, <T as FromStr>::Err: Display,
Expand description

If the provided key exists, takes its value from the provided config and returns it. If the provided key does not exist, it returns None. Adds a diagnostic if there is any problem deserializing the value.