backup_and_reset

Function backup_and_reset 

pub(super) fn backup_and_reset(
    path: &Path,
    reason: HeaderError,
) -> Result<InMemorySession>
Expand description

Renames path aside as a timestamped backup and returns an empty session.

Used when the header makes the file impossible to interpret at all, as opposed to a merely corrupt or truncated tail, which the journal replay self-heals by truncating.