Skip to main content

ralph/
undo.rs

1//! Purpose: Provide the public undo API for queue snapshot creation, listing,
2//! restore, and retention.
3//!
4//! Responsibilities:
5//! - Declare the `undo` child modules.
6//! - Re-export the stable undo data models and operations.
7//!
8//! Scope:
9//! - Thin facade only; implementation lives in sibling files under `undo/`.
10//!
11//! Usage:
12//! - Import undo helpers through `crate::undo`.
13//!
14//! Invariants/Assumptions:
15//! - The public undo API remains stable across this split.
16//! - Snapshot creation, restore, and pruning behavior remain unchanged.
17
18mod model;
19mod prune;
20mod restore;
21mod storage;
22
23#[cfg(test)]
24mod tests;
25
26pub use model::{RestoreResult, SnapshotList, UndoSnapshot, UndoSnapshotMeta};
27pub use prune::prune_old_undo_snapshots;
28pub use restore::restore_from_snapshot;
29pub use storage::{create_undo_snapshot, list_undo_snapshots, load_undo_snapshot, undo_cache_dir};
30
31#[cfg(test)]
32pub(crate) use storage::UNDO_SNAPSHOT_PREFIX;