Skip to main content

RecoverySource

Enum RecoverySource 

Source
#[non_exhaustive]
pub enum RecoverySource { FreelistPage, InPageFreeBlock, DroppedTable, PriorVersion, FreeblockReconstructed, WalFrame, CommitSnapshot, RollbackJournal(RollbackJournalSource), }
Expand description

Which class of free space a deleted record was carved from. Records the recovery provenance so the examiner can weigh reliability by class.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

FreelistPage

A whole page that was freed onto the freelist (the strongest case: the page holds only deallocated content).

§

InPageFreeBlock

The in-page free space (unallocated gap / freeblock slack) of a page that is still allocated. The record is genuinely deleted but more likely to be partially overwritten, so it is graded lower.

§

DroppedTable

A page whose table was DROPped — on the freelist with no sqlite_master schema, so the column count was inferred from the record itself.

§

PriorVersion

A prior version of a still-live row: an UPDATE freed the old version of the row into slack while the new version kept the same rowid. The recovered values DIFFER from the current live row (e.g. an edited message or a changed amount), so it is genuine deleted content — the edit history.

§

FreeblockReconstructed

A record rebuilt by freeblock reconstruction: the freed cell’s first four bytes (payload-length + rowid varints, header_len, and the leading serial type) were overwritten by SQLite’s freeblock header, so the record was rebuilt from its surviving serial-type tail plus a schema template. The rowid is destroyed (surfaced as 0), so this is the weakest in-page class — a low-confidence “consistent with a deleted row” lead.

§

WalFrame

Residue carved from an uncheckpointed WAL frame’s page image rather than the on-disk pages. A -wal frame holds a committed page version the main file does not yet reflect; deleted cells freed within that version survive in the frame’s slack and exist NOWHERE on disk. The record carries the (salt1, salt2, frame_index) log-sequence provenance in CarvedRecord::wal.

§

CommitSnapshot

Residue carved from a materialized commit snapshot — the database state replayed up to one COMMIT frame of the -wal (base image ∪ committed frames to that commit). A row that is a live cell at this commit but deleted by a later commit survives ONLY in this snapshot’s page images. The record carries the commit’s (salt1, salt2, commit_frame_index) LSN in CarvedRecord::wal — the per-commit temporal coordinate, distinct from a raw RecoverySource::WalFrame residue’s frame index.

§

RollbackJournal(RollbackJournalSource)

A prior allocated row from the rollback journal (design §5). The row was LIVE in the pre-transaction state the -journal preserves and the last transaction deleted or modified it — it is NOT a free-space residue, so downstream reports must not relabel it as unallocated. Carries the page / segment / header-state / checksum provenance in RollbackJournalSource.

Trait Implementations§

Source§

impl Clone for RecoverySource

Source§

fn clone(&self) -> RecoverySource

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RecoverySource

Source§

impl Debug for RecoverySource

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for RecoverySource

Source§

impl PartialEq for RecoverySource

Source§

fn eq(&self, other: &RecoverySource) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RecoverySource

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.