pub fn save_config_file<T, P>(config: &T, config_file: P) -> Result<(), Error>where
    T: Serialize,
    P: AsRef<Path>,
Expand description

Save a value to a file in YAML format.

Despite the name, this function is a generic YAML file serializer, a thin wrapper around serde.

If the file’s directory does not exist, it will be created. If the file already exists, it will be overwritten.

Most callers should instead use Config::save.

Errors

This function may return typical file I/O errors.