Struct NtfsIndexAllocation

Source
pub struct NtfsIndexAllocation<'n, 'f> { /* private fields */ }
Expand description

Structure of an $INDEX_ALLOCATION attribute.

This attribute describes the sub-nodes of a B-tree. The top-level nodes are managed via NtfsIndexRoot.

NTFS uses B-trees for describing directories (as indexes of NtfsFileNames), looking up Object IDs, Reparse Points, and Security Descriptors, to just name a few.

An $INDEX_ALLOCATION attribute can be resident or non-resident.

Reference: https://flatcap.github.io/linux-ntfs/ntfs/attributes/index_allocation.html

Implementations§

Source§

impl<'n, 'f> NtfsIndexAllocation<'n, 'f>

Source

pub fn record_from_vcn<T>( &self, fs: &mut T, index_record_size: u32, vcn: Vcn, ) -> Result<NtfsIndexRecord>
where T: Read + Seek,

Returns the NtfsIndexRecord located at the given Virtual Cluster Number (VCN).

The record is fully read, fixed up, and validated.

This function is usually called on the return value of NtfsIndexEntry::subnode_vcn to move further down in the B-tree.

Source

pub fn records(&self, index_record_size: u32) -> NtfsIndexRecords<'n, 'f>

Returns an iterator over all Index Records of this $INDEX_ALLOCATION attribute (cf. NtfsIndexRecord).

Each Index Record is fully read, fixed up, and validated.

Trait Implementations§

Source§

impl<'n, 'f> Clone for NtfsIndexAllocation<'n, 'f>

Source§

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

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<'n, 'f> Debug for NtfsIndexAllocation<'n, 'f>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'n, 'f> NtfsStructuredValue<'n, 'f> for NtfsIndexAllocation<'n, 'f>

Source§

const TY: NtfsAttributeType = NtfsAttributeType::IndexAllocation

Source§

fn from_attribute_value<T>( _fs: &mut T, value: NtfsAttributeValue<'n, 'f>, ) -> Result<Self>
where T: Read + Seek,

Create a structured value from an arbitrary NtfsAttributeValue.

Auto Trait Implementations§

§

impl<'n, 'f> Freeze for NtfsIndexAllocation<'n, 'f>

§

impl<'n, 'f> RefUnwindSafe for NtfsIndexAllocation<'n, 'f>

§

impl<'n, 'f> Send for NtfsIndexAllocation<'n, 'f>

§

impl<'n, 'f> Sync for NtfsIndexAllocation<'n, 'f>

§

impl<'n, 'f> Unpin for NtfsIndexAllocation<'n, 'f>

§

impl<'n, 'f> UnwindSafe for NtfsIndexAllocation<'n, 'f>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

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