Skip to main content

VmdkIntegrity

Struct VmdkIntegrity 

Source
pub struct VmdkIntegrity<R: Read + Seek> { /* private fields */ }
Expand description

Forensic integrity analyzer over any Read + Seek VMDK source.

Reparses the raw structure on each call, so a single instance can run several analyses and tolerates partially-damaged images.

Implementations§

Source§

impl<R: Read + Seek> VmdkIntegrity<R>

Source

pub fn new(reader: R) -> Self

Wrap a Read + Seek VMDK source.

Source

pub fn into_inner(self) -> R

Recover the wrapped reader.

Source

pub fn validate_rgd(&mut self) -> Result<bool>

Validate the redundant grain directory by comparing the grain-table contents each directory references (not the pointers, which differ by design in every healthy multi-copy image). Ok(true) when they match, Ok(false) when the RGD is absent or diverges.

Source

pub fn grain_directory_recovery(&mut self) -> Result<GdRecoveryReport>

Classify every grain-directory entry against the redundant copy: how much of the primary GD is intact, damaged, and recoverable via the RGD.

Source

pub fn check_integrity(&mut self) -> Result<IntegrityReport>

Walk the grain directory and tables, counting pointers that fall beyond end-of-file (the signature of a truncated or tampered image). Covers VMDK4 sparse and seSparse; flat/COWD images report clean.

Source

pub fn header_provenance(&mut self) -> Result<Option<HeaderProvenance>>

Read the 512-byte sparse-header provenance, or None if the header is not VMDK4.

Source

pub fn analyse(&mut self) -> Result<Vec<Finding>>

Run every analysis and aggregate the findings into a graded list of canonical Findings, sorted most-severe first.

Auto Trait Implementations§

§

impl<R> Freeze for VmdkIntegrity<R>
where R: Freeze,

§

impl<R> RefUnwindSafe for VmdkIntegrity<R>
where R: RefUnwindSafe,

§

impl<R> Send for VmdkIntegrity<R>
where R: Send,

§

impl<R> Sync for VmdkIntegrity<R>
where R: Sync,

§

impl<R> Unpin for VmdkIntegrity<R>
where R: Unpin,

§

impl<R> UnsafeUnpin for VmdkIntegrity<R>
where R: UnsafeUnpin,

§

impl<R> UnwindSafe for VmdkIntegrity<R>
where R: UnwindSafe,

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> 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.