Skip to main content

Module undo

Module undo 

Source
Expand description

Purpose: Provide the public undo API for queue snapshot creation, listing, restore, and retention.

Responsibilities:

  • Declare the undo child modules.
  • Re-export the stable undo data models and operations.

Scope:

  • Thin facade only; implementation lives in sibling files under undo/.

Usage:

  • Import undo helpers through crate::undo.

Invariants/Assumptions:

  • The public undo API remains stable across this split.
  • Snapshot creation, restore, and pruning behavior remain unchanged.

Structs§

RestoreResult
Result of a restore operation.
SnapshotList
Result of listing snapshots.
UndoSnapshot
Full snapshot content (stored in JSON file).
UndoSnapshotMeta
Metadata about a single undo snapshot.

Functions§

create_undo_snapshot
Create a snapshot before a mutation operation.
list_undo_snapshots
List available undo snapshots, newest first.
load_undo_snapshot
Load a full snapshot by ID.
prune_old_undo_snapshots
Prune old snapshots to enforce retention limit.
restore_from_snapshot
Restore queue state from a snapshot.
undo_cache_dir
Get the undo cache directory path.