#[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
sourceimpl MemoryType
impl MemoryType
sourcepub const RESERVED: MemoryType
pub const RESERVED: MemoryType
This enum variant is not used.
sourcepub const LOADER_CODE: MemoryType
pub const LOADER_CODE: MemoryType
The code portions of a loaded UEFI application.
sourcepub const LOADER_DATA: MemoryType
pub const LOADER_DATA: MemoryType
The data portions of a loaded UEFI applications, as well as any memory allocated by it.
sourcepub const BOOT_SERVICES_CODE: MemoryType
pub const BOOT_SERVICES_CODE: MemoryType
Code of the boot drivers.
Can be reused after OS is loaded.
sourcepub const BOOT_SERVICES_DATA: MemoryType
pub const BOOT_SERVICES_DATA: MemoryType
Memory used to store boot drivers’ data.
Can be reused after OS is loaded.
sourcepub const RUNTIME_SERVICES_CODE: MemoryType
pub const RUNTIME_SERVICES_CODE: MemoryType
Runtime drivers’ code.
sourcepub const RUNTIME_SERVICES_DATA: MemoryType
pub const RUNTIME_SERVICES_DATA: MemoryType
Runtime services’ code.
sourcepub const CONVENTIONAL: MemoryType
pub const CONVENTIONAL: MemoryType
Free usable memory.
sourcepub const UNUSABLE: MemoryType
pub const UNUSABLE: MemoryType
Memory in which errors have been detected.
sourcepub const ACPI_RECLAIM: MemoryType
pub const ACPI_RECLAIM: MemoryType
Memory that holds ACPI tables. Can be reclaimed after they are parsed.
sourcepub const ACPI_NON_VOLATILE: MemoryType
pub const ACPI_NON_VOLATILE: MemoryType
Firmware-reserved addresses.
sourcepub const MMIO: MemoryType
pub const MMIO: MemoryType
A region used for memory-mapped I/O.
sourcepub const MMIO_PORT_SPACE: MemoryType
pub const MMIO_PORT_SPACE: MemoryType
Address space used for memory-mapped port I/O.
sourcepub const PAL_CODE: MemoryType
pub const PAL_CODE: MemoryType
Address space which is part of the processor.
sourcepub const PERSISTENT_MEMORY: MemoryType
pub const PERSISTENT_MEMORY: MemoryType
Memory region which is usable and is also non-volatile.
sourceimpl MemoryType
impl MemoryType
sourcepub const fn custom(value: u32) -> MemoryType
pub const fn custom(value: u32) -> MemoryType
Construct a custom MemoryType
. Values in the range 0x80000000..=0xffffffff
are free for use if you are
an OS loader.
Trait Implementations
sourceimpl Clone for MemoryType
impl Clone for MemoryType
sourcefn clone(&self) -> MemoryType
fn clone(&self) -> MemoryType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MemoryType
impl Debug for MemoryType
sourceimpl PartialEq<MemoryType> for MemoryType
impl PartialEq<MemoryType> for MemoryType
sourcefn eq(&self, other: &MemoryType) -> bool
fn eq(&self, other: &MemoryType) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MemoryType) -> bool
fn ne(&self, other: &MemoryType) -> bool
This method tests for !=
.
impl Copy for MemoryType
impl Eq for MemoryType
impl StructuralEq for MemoryType
impl StructuralPartialEq for MemoryType
Auto Trait Implementations
impl RefUnwindSafe for MemoryType
impl Send for MemoryType
impl Sync for MemoryType
impl Unpin for MemoryType
impl UnwindSafe for MemoryType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more