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

A single NTFS Attribute of an NtfsFile.

Not to be confused with NtfsFileAttributeFlags.

This structure is returned by the NtfsAttributesRaw iterator as well as NtfsAttributeItem::to_attribute.

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

Implementations

Returns the length of this NTFS Attribute, in bytes.

This denotes the length of the attribute structure on disk. Apart from various headers, this structure also includes the name and, for resident attributes, the actual value.

Returns flags set for this attribute as specified by NtfsAttributeFlags.

Returns the identifier of this attribute that is unique within the NtfsFile.

Returns true if this is a resident attribute, i.e. one where its value is part of the attribute structure.

Gets the name of this NTFS Attribute (if any) and returns it wrapped in an NtfsString.

Note that most NTFS attributes have no name and are distinguished by their types. Use NtfsAttribute::ty to get the attribute type.

Returns the length of the name of this NTFS Attribute, in bytes.

An attribute name has a maximum length of 255 UTF-16 code points (510 bytes). It is always part of the attribute itself and hence also of the length returned by NtfsAttribute::attribute_length.

Returns the absolute position of this NTFS Attribute within the filesystem, in bytes.

Attempts to parse the value data as the given resident structured value type and returns that.

This is a fast path for attributes that are always resident. It doesn’t need a reference to the filesystem reader.

This function first checks that the attribute is of the required type for that structured value and if it’s a resident attribute. It returns with an error if that is not the case. It also returns an error for any parsing problem.

Attempts to parse the value data as the given structured value type and returns that.

This function first checks that the attribute is of the required type for that structured value. It returns with an error if that is not the case. It also returns an error for any parsing problem.

Returns the type of this NTFS Attribute, or NtfsError::UnsupportedAttributeType if it’s an unknown type.

Returns an NtfsAttributeValue structure to read the value of this NTFS Attribute.

Returns the length of the value data of this NTFS Attribute, in bytes.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.