vhdx_forensic/lib.rs
1//! VHDX forensic integrity analyser and in-memory repair tool.
2//!
3//! Depends on the `vhdx` crate for container parsing. Exports `VhdxIntegrity`,
4//! `VhdxRepair`, and all anomaly/severity types.
5//!
6//! # Layer
7//! FORENSIC AUDIT — equivalent role to `ewf-forensic` for E01 images.
8
9pub mod integrity;
10pub mod repair;
11
12// Re-export the reader so callers don't need two crates for basic use.
13pub use vhdx::{header::crc32c, Result, VhdxError, VhdxReader, FILE_MAGIC};
14pub use integrity::{AnalysisSummary, Severity, VhdxIntegrity, VhdxIntegrityAnomaly};
15
16/// Return references to all anomalies whose severity is at or above `min`.
17pub fn anomalies_at_least<'a>(
18 anomalies: &'a [VhdxIntegrityAnomaly],
19 min: Severity,
20) -> Vec<&'a VhdxIntegrityAnomaly> {
21 anomalies.iter().filter(|a| a.severity() >= min).collect()
22}
23pub use repair::{CannotRepair, RepairAction, RepairReport, VhdxRepair};