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 serialize
§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
§Note
TOML is always pretty-printed for readability