Struct ntfs::NtfsIndex

source ·
pub struct NtfsIndex<'n, 'f, E>where
    E: NtfsIndexEntryType,{ /* private fields */ }
Expand description

Helper structure to iterate over all entries of an index or find a specific one.

The E type parameter of NtfsIndexEntryType specifies the type of the index entries. The most common one is NtfsFileNameIndex for file name indexes, commonly known as “directories”. Check out NtfsFile::directory_index to return an NtfsIndex object for a directory without any hassles.

Implementations§

source§

impl<'n, 'f, E> NtfsIndex<'n, 'f, E>where E: NtfsIndexEntryType,

source

pub fn new( index_root_item: NtfsAttributeItem<'n, 'f>, index_allocation_item: Option<NtfsAttributeItem<'n, 'f>> ) -> Result<Self>

Creates a new NtfsIndex object from a previously looked up NtfsIndexRoot attribute (contained in an NtfsAttributeItem) and, in case of a large index, a matching NtfsIndexAllocation attribute (also contained in an NtfsAttributeItem).

If you just want to look up files in a directory, check out NtfsFile::directory_index, which looks up the correct NtfsIndexRoot and NtfsIndexAllocation attributes for you.

source

pub fn entries<'i>(&'i self) -> NtfsIndexEntries<'n, 'f, 'i, E>

Returns an NtfsIndexEntries iterator to perform an in-order traversal of this index.

source

pub fn finder<'i>(&'i self) -> NtfsIndexFinder<'n, 'f, 'i, E>

Returns an NtfsIndexFinder structure to efficiently find an entry in this index.

Trait Implementations§

source§

impl<'n, 'f, E> Clone for NtfsIndex<'n, 'f, E>where E: NtfsIndexEntryType + Clone,

source§

fn clone(&self) -> NtfsIndex<'n, 'f, E>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'n, 'f, E> Debug for NtfsIndex<'n, 'f, E>where E: NtfsIndexEntryType + Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'n, 'f, E> RefUnwindSafe for NtfsIndex<'n, 'f, E>where E: RefUnwindSafe,

§

impl<'n, 'f, E> Send for NtfsIndex<'n, 'f, E>where E: Send,

§

impl<'n, 'f, E> Sync for NtfsIndex<'n, 'f, E>where E: Sync,

§

impl<'n, 'f, E> Unpin for NtfsIndex<'n, 'f, E>where E: Unpin,

§

impl<'n, 'f, E> UnwindSafe for NtfsIndex<'n, 'f, E>where E: UnwindSafe,

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> ToOwned for Twhere T: Clone,

§

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