pub fn with_workload<F>(workload_path: &Path, mutate: F) -> Result<()>Expand description
Run a workload edit transaction. The closure produces the new source content; the driver handles lock, backup, roundtrip-parse, and atomic commit.
Errors:
- lock contention → kind
WouldBlockwith pid hint; - I/O on read / write → propagated;
- mutation closure error → propagated, no on-disk change;
- post-mutate parse failure → backups rolled back, no on-disk change, error explains parse failure.