pub fn write_wal_segment<W: Write>(
writer: &mut W,
shard_id: u32,
records: &[(u64, &[u8])],
) -> Result<WalSegmentManifest>Expand description
Write one full WAL segment: manifest chunk, then one framed chunk per record (each chunk independently checksummed; the manifest also carries a CRC over all records). Returns the manifest.
ยงErrors
Returns an I/O error if writing the manifest or any record fails.