#[repr(transparent)]
pub struct MemoryType(pub u32);
Expand description

The type of a memory range.

UEFI allows firmwares and operating systems to introduce new memory types in the 0x70000000..0xFFFFFFFF range. Therefore, we don’t know the full set of memory types at compile time, and it is not safe to model this C enum as a Rust enum.

Tuple Fields

0: u32

Implementations

This enum variant is not used.

The code portions of a loaded UEFI application.

The data portions of a loaded UEFI applications, as well as any memory allocated by it.

Code of the boot drivers.

Can be reused after OS is loaded.

Memory used to store boot drivers’ data.

Can be reused after OS is loaded.

Runtime drivers’ code.

Runtime services’ code.

Free usable memory.

Memory in which errors have been detected.

Memory that holds ACPI tables. Can be reclaimed after they are parsed.

Firmware-reserved addresses.

A region used for memory-mapped I/O.

Address space used for memory-mapped port I/O.

Address space which is part of the processor.

Memory region which is usable and is also non-volatile.

Construct a custom MemoryType. Values in the range 0x80000000..=0xffffffff are free for use if you are an OS loader.

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.