#[repr(C)]
pub struct NamedFileProtocolInfo<Header> { /* private fields */ }
Expand description

Dynamically sized FileProtocolInfo with a header and an UCS-2 name

All structs that can currently be queried via Get/SetInfo can be described as a (possibly empty) header followed by a variable-sized name.

Since such dynamic-sized types are a bit unpleasant to handle in Rust today, this generic struct was created to deduplicate the relevant code.

The reason why this struct covers the whole DST, as opposed to the [Char16] part only, is that pointers to DSTs are created in a rather unintuitive way that is best kept centralized in one place.

Implementations

Create a FileInfo structure

The structure will be created in-place within the provided storage buffer. The buffer must be large enough to hold the data structure, including a null-terminated UCS-2 version of the name string.

The buffer must be correctly aligned. You can query the required alignment using the alignment() method of the Align trait that this struct implements.

File size (number of bytes stored in the file)

Physical space consumed by the file on the file system volume

Time when the file was created

Time when the file was last accessed

Time when the file’s contents were last modified

Attribute bits for the file

Name of the file

Create a FileSystemInfo structure

The structure will be created in-place within the provided storage buffer. The buffer must be large enough to hold the data structure, including a null-terminated UCS-2 version of the name string.

The buffer must be correctly aligned. You can query the required alignment using the alignment() method of the Align trait that this struct implements.

Truth that the volume only supports read access

Number of bytes managed by the file system

Number of available bytes for use by the file system

Nominal block size by which files are typically grown

Volume label

Create a FileSystemVolumeLabel structure

The structure will be created in-place within the provided storage buffer. The buffer must be large enough to hold the data structure, including a null-terminated UCS-2 version of the name string.

The buffer must be correctly aligned. You can query the required alignment using the alignment() method of the Align trait that this struct implements.

Volume label

Trait Implementations

Required memory alignment for this type

Assert that some storage is correctly aligned for this type

Formats the value using the given formatter. Read more

Turn an UEFI-provided pointer-to-base into a (possibly fat) Rust reference 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 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.