Skip to main content

AuditReport

Struct AuditReport 

Source
pub struct AuditReport {
    pub anomalies: Vec<Anomaly>,
    pub inodes_visited: u32,
    pub entries_scanned: u64,
    pub directories_scanned: u32,
    pub anomalies_count: u64,
    pub initial_anomalies_count: u64,
    pub repaired_count: u64,
}
Expand description

Summary returned by audit. Empty anomalies means the subset of invariants checked all held.

Fields§

§anomalies: Vec<Anomaly>

Every problem found, in no particular order. Populated by the legacy audit entry point; left empty by audit_with_callbacks (it streams findings through the caller’s closure to avoid buffering on huge volumes).

§inodes_visited: u32

Number of distinct inodes visited via directory entries.

§entries_scanned: u64

Number of directory entries scanned (including ., .., and tombstones).

§directories_scanned: u32

Number of directories scanned.

§anomalies_count: u64

Authoritative current count of anomalies on the filesystem. After audit / audit_with_callbacks this is the count from the single scan. After a repair pass (audit_with_repair with repair = true) this is the post-repair re-scan count — the actual remaining problems on disk, NOT the pre-repair number minus repaired (which would be unreliable if our repair logic itself introduces new anomalies).

§initial_anomalies_count: u64

Number of anomalies the audit ORIGINALLY found, before any repair commits. Equal to anomalies_count for non-repair runs. After a repair pass: initial_anomalies_count - repaired_count is what we expect to remain; the actual anomalies_count from the post-repair re-scan is what REALLY remains. Discrepancies between the two are how we notice repair logic has bugs.

§repaired_count: u64

Anomalies the repair pass actually mutated the disk to fix. Always zero unless audit_with_repair ran with repair = true. A repair that failed midway leaves this counter at the number of successfully-committed fixes — partial progress is intentional (each commit is its own journal transaction so a crash mid-pass can’t compound the damage).

Implementations§

Trait Implementations§

Source§

impl Clone for AuditReport

Source§

fn clone(&self) -> Self

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 Debug for AuditReport

Source§

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

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

impl Default for AuditReport

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.