Skip to main content

write_record

Function write_record 

Source
pub fn write_record(
    directory: &Path,
    filename: &str,
    bytes: &[u8],
    sync: RecordSync,
) -> Result<(), String>
Expand description

What: Write filename in directory exclusively and whole, then sync as sync says. Returns the failure as a sentence that names the path. Why: The callers report a failed write as a landing or transaction failure and differ only in the type that wraps the sentence.

In TS you’d write (pseudocode):

await writeRecord({ directory, filename, bytes, sync });