Struct ntfs::NtfsIndexRecord

source ·
pub struct NtfsIndexRecord { /* private fields */ }
Expand description

A single NTFS Index Record.

These records are denoted via an INDX signature on the filesystem.

NTFS uses B-tree indexes to quickly look up files, Object IDs, Reparse Points, Security Descriptors, etc. An Index Record is further comprised of Index Entries, which contain the actual key/data (see NtfsIndexEntry, iterated via NtfsIndexNodeEntries).

Reference: https://flatcap.github.io/linux-ntfs/ntfs/concepts/index_record.html

Implementations§

source§

impl NtfsIndexRecord

source

pub fn entries<E>(&self) -> Result<NtfsIndexNodeEntries<'_, E>>where E: NtfsIndexEntryType,

Returns an iterator over all entries of this Index Record (cf. NtfsIndexEntry).

source

pub fn has_subnodes(&self) -> bool

Returns whether this index node has sub-nodes. Otherwise, this index node is a leaf node.

source

pub fn index_allocated_size(&self) -> u32

Returns the allocated size of this NTFS Index Record, in bytes.

source

pub fn index_data_size(&self) -> u32

Returns the size actually used by index data within this NTFS Index Record, in bytes.

source

pub fn vcn(&self) -> Vcn

Returns the Virtual Cluster Number (VCN) of this Index Record, as reported by the header of this Index Record.

This can be used to double-check that an Index Record is the actually requested one. NtfsIndexAllocation::record_from_vcn uses it for that purpose.

Trait Implementations§

source§

impl Debug for NtfsIndexRecord

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.