Skip to main content

write_journal_record

Function write_journal_record 

Source
pub fn write_journal_record(
    directory: &Path,
    filename: &str,
    text: &str,
) -> Result<(), TransactionStop>
Expand description

What: Write one journal record durably: exclusively, then the directory entry. Why: A state file is never rewritten, so a crash leaves the newest complete state readable.

In TS you’d write (pseudocode):

await writeJournalRecord({ directory, filename, record });