pub struct RecoveryPolicy {
pub quarantine_corrupt: bool,
pub quarantine_keyed: bool,
pub quarantine_stamp: QuarantineStamp,
pub sidecars: SidecarPolicy,
pub allow_in_memory_fallback: bool,
}Fields§
§quarantine_corrupt: boolQuarantine-and-recreate an unreadable plain database.
quarantine_keyed: boolAlso allow it for a keyed database (destroys access to data a wrong key could have read).
quarantine_stamp: QuarantineStampSuffix format of the quarantined file. Default .corrupt-<unix-ms>.
sidecars: SidecarPolicyWhat happens to the -wal, -shm and -journal sidecars. Default renames them alongside
the quarantined file.
allow_in_memory_fallback: boolExplicit acknowledgement that recovery may fall back to a private in-memory store
when the stored database cannot be used. Default false (refuse): the open fails
with the original error instead of silently running on data that will not persist.
When true, the result still reports degraded.in_memory, and the configured
SQLCipher key is still applied to the in-memory store; it is never a plaintext
fallback and makes no persistence claim.