Skip to main content

Module exporter

Module exporter 

Source
Expand description

Archive writing. export writes the version and the starting nonce in the clear, then one zstd stream of length-prefixed AES-GCM frames: the metadata, then every element of one database snapshot. Frames are written as rows are read, so memory does not grow with the history.

Structs§

ArchiveExporter
Namespace for ArchiveExporter::export_to_file, which the native bindings call.
ElementWriter
Streams standard archive elements to a synchronous sink.

Functions§

export
Writes an archive of everything options selects, read in one snapshot measured at one export time, to sink, and returns its metadata. Fails, rather than omitting it, when a selected record cannot be read; on failure sink holds an incomplete archive that the caller must discard. sink is written while the snapshot’s read transaction is open, so it must not use the database.