pub struct CellFragment {
pub offset: usize,
pub byte_len: usize,
pub surviving: Vec<(usize, Value)>,
pub missing: usize,
pub confidence: f32,
}Expand description
A partial deleted record salvaged from a freed-cell reconstruction that
failed full-row validation: the maximal decodable column prefix at a
structural anchor Database::reconstruct_freeblock_records already trusts.
Deliberately NOT a CarvedCell: it has no rowid (clobbered) and an
incomplete value set, so the type system keeps it out of the full-row output
— a fragment can never be silently rendered as a recovered row. Emitted only
at an anchor where full reconstruction failed but at least one distinctive
cell (TEXT ≥ 4 bytes of valid UTF-8, or REAL) decoded cleanly, so a lone
coincidental integer pattern never anchors a fragment. Graded
FRAGMENT_CONFIDENCE — strictly below every full-row class.
Fields§
§offset: usizeByte offset of the failed cell’s anchor within the scanned page slice.
byte_len: usizeBytes covered by the decoded prefix (anchor to the last decoded body byte).
surviving: Vec<(usize, Value)>(column_index, value) for each column that decoded cleanly, ascending by
index. Column indexes come from the page’s schema template, so they are
meaningful against the table’s column order.
missing: usizeNumber of the template’s columns that did NOT decode (column_count minus
the number of surviving columns).
confidence: f32Always FRAGMENT_CONFIDENCE for now; the field is kept so future
per-fragment grading does not change the public type.
Trait Implementations§
Source§impl Clone for CellFragment
impl Clone for CellFragment
Source§fn clone(&self) -> CellFragment
fn clone(&self) -> CellFragment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more