Skip to main content

validate

Function validate 

Source
pub fn validate<R: RawKv>(
    raw: &R,
) -> Result<(usize, usize), FlatError<R::Error>>
Expand description

A whole-store walk that validates every row against the layout.

Every row must classify into exactly one kind (version, HCA counter, HCA recent, node row, data row) with well-formed fields; every node that is referenced as a child must have its layer row; every data key must resolve to such a live directory. Returns the counted (data rows, child rows); Err(FlatError::Corrupt) on a malformed row, Err(FlatError::Foreign) on content the layout does not own (a row that classifies into no kind).