write_committed_record

Function write_committed_record 

pub async fn write_committed_record<W, const SLOT: usize>(
    writer: &mut W,
    target: u32,
    bytes: &[u8; SLOT],
) -> Result<(), CommitError<<W as RecordWriter>::Error>>
where W: RecordWriter,
Expand description

Write a record body first and its visibility marker last. The record’s last four bytes are the commit word (shared convention across every journal in this crate).

The caller must not publish the corresponding in-RAM snapshot until this returns Ok(()). A mount ignores either failure shape because the commit word remains incomplete.