Skip to main content

MftData

Struct MftData 

Source
pub struct MftData {
    pub entries: Vec<MftEntry>,
    pub by_entry: HashMap<u64, usize>,
    pub by_key: HashMap<EntryKey, usize>,
}
Expand description

Parsed $MFT data for correlation.

Fields§

§entries: Vec<MftEntry>

All parsed entries.

§by_entry: HashMap<u64, usize>

Map: entry_number -> index in entries vec (for current allocation).

§by_key: HashMap<EntryKey, usize>

Map: (entry, sequence) -> index (sequence-aware lookup).

Implementations§

Source§

impl MftData

Source

pub fn parse(data: &[u8]) -> Result<Self>

Parse raw $MFT data.

§Errors

Currently infallible — malformed records are skipped rather than surfaced as errors — but the signature is fallible to leave room for future fatal conditions.

Source

pub fn seed_rewind(&self) -> RewindEngine

Seed a RewindEngine with the current MFT state.

Source

pub fn detect_timestomping(&self) -> Vec<&MftEntry>

Detect potential timestomping: $SI created before $FN created.

Source

pub fn get_by_entry(&self, entry_number: u64) -> Option<&MftEntry>

Get entry by entry number (current allocation).

Source

pub fn get_by_key(&self, key: &EntryKey) -> Option<&MftEntry>

Get entry by (entry, sequence) pair.

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> 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, 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.