#[non_exhaustive]pub struct IntegrityReport {
pub failures: Vec<IntegrityFailure>,
pub pages_checked: u64,
pub elapsed: Duration,
}Expand description
Structured result of an integrity check.
The public driver returns this inside Ok(_) whenever the walk
completes (whether or not it found any failures). An Err
outer result means the walk could not finish — an I/O failure,
not a content-level integrity violation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.failures: Vec<IntegrityFailure>Every detected violation, in walker-encounter order.
pages_checked: u64Pages the walker actually inspected (header + every tree
node + every freelist link). Provides a sanity-check vs
page_count: a check that ran without errors but visited
noticeably fewer pages than the file holds suggests a
reachability problem (the IntegrityFailure::OrphanPage
failures cover the concrete cases).
elapsed: DurationWall-clock duration the walk took. Useful for the operator to know whether the check finished within a maintenance window.
Implementations§
Source§impl IntegrityReport
impl IntegrityReport
Sourcepub fn new(
failures: Vec<IntegrityFailure>,
pages_checked: u64,
elapsed: Duration,
) -> IntegrityReport
pub fn new( failures: Vec<IntegrityFailure>, pages_checked: u64, elapsed: Duration, ) -> IntegrityReport
Assemble a report from its parts.
Provided so callers outside obj-core (the obj layer’s
integrity_check driver) can build a report now that the
struct is #[non_exhaustive] and can no longer be
struct-literal-constructed across crate boundaries.
Trait Implementations§
Source§impl Clone for IntegrityReport
impl Clone for IntegrityReport
Source§fn clone(&self) -> IntegrityReport
fn clone(&self) -> IntegrityReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more