pub struct ExportRequest {
pub dest_dir: PathBuf,
pub reply: Sender<Result<ExportManifest, SnapshotError>>,
}Expand description
A request, sent into a running watch_applied loop, to export the fold it
owns (see SnapshotStore::export_to).
watch_applied takes its snapshot store by value, so a consumer that
wants periodic artifacts of a live fold cannot call export_to itself. It
instead passes an mpsc::Receiver<ExportRequest> to watch_applied and
sends requests through the paired sender. The loop handles a request
between batch flushes — after flushing any pending batch — so the artifact’s
embedded cursor is exactly the applied cursor at the moment of export.
The export result (or error) comes back on reply; an export failure is
reported there and the watch keeps running (the snapshot is a cache — a
failed artifact is the requester’s problem, not the fold’s).
Fields§
§dest_dir: PathBufWhere the artifact directory will be created. Must not exist (or be an empty directory); same filesystem as the fold for cheap hardlinks.
reply: Sender<Result<ExportManifest, SnapshotError>>Receives the sealed manifest on success. A dropped receiver is ignored.