pub(crate) fn write_toml_file_atomic<T: Serialize>(
path: &Path,
value: &T,
header: &str,
) -> Result<()>Expand description
Write a Tempo registry file atomically via temp file + rename.
This keeps every registry on the same durability path and avoids repeating the same create-dir / serialize / flush / persist sequence in each caller. The temp file and parent directory are synced so rename is much closer to a crash-safe durable write.