pub fn maybe_snapshot_pre_migration(
db_dir: &Path,
snapshots_dir: &Path,
channel: &str,
code_version: &str,
current_schema_version: i64,
) -> Result<Option<PathBuf>, SnapshotError>Expand description
High-level entry: check, snapshot, prune. Returns the snapshot dir on
success, or None if no snapshot was needed. Errors are surfaced to the
caller; production call sites should log-and-continue rather than abort
boot (see module docs).