pub fn write_toml_file<T>(path: &Path, data: &T) -> Result<()>where
T: Serialize,Expand description
Writes data as TOML to a file atomically.
§Arguments
path- The path to write todata- The data to serializepretty- Whether to use pretty formatting (always true for TOML)
§Type Parameters
T- The type to serialize (must implement Serialize)
§Returns
Ok(()) on success
§Errors
Returns an error if serialization fails or the file cannot be written