Realm

oa::ml::save_run_state

Commit a run state atomically: write the complete payload to a sibling temporary file, flush, then rename over path. A crash anywhere before the rename leaves either the previous committed state or nothing — never a truncated run state. Errors Returns an error when serialization, the temporary write, flush, or rename fails.

FnRust public API

Function Documentation

pub fn save_run_state(path: &Path, state: &RunState) -> Result<()>
Commit a run state atomically: write the complete payload to a sibling temporary file, flush, then rename over path. A crash anywhere before the rename leaves either the previous committed state or nothing — never a truncated run state. Errors Returns an error when serialization, the temporary write, flush, or rename fails.