Enum multiboot2::MemoryAreaType
source · pub enum MemoryAreaType {
Available,
Reserved,
AcpiAvailable,
ReservedHibernate,
Defective,
Custom(u32),
}
Expand description
Abstraction over defined memory types for the memory map as well as custom ones. Types 1 to 5 are defined in the Multiboot2 spec and correspond to the entry types of e820 memory maps.
This is not binary compatible with the Multiboot2 spec. Please use
MemoryAreaTypeId
instead.
Variants§
Available
Available memory free to be used by the OS.
Reserved
A reserved area that must not be used.
AcpiAvailable
Usable memory holding ACPI information.
ReservedHibernate
Reserved memory which needs to be preserved on hibernation. Also called NVS in spec, which stands for “Non-Volatile Sleep/Storage”, which is part of ACPI specification.
Defective
Memory which is occupied by defective RAM modules.
Custom(u32)
Custom memory map type.
Trait Implementations§
source§impl Clone for MemoryAreaType
impl Clone for MemoryAreaType
source§fn clone(&self) -> MemoryAreaType
fn clone(&self) -> MemoryAreaType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MemoryAreaType
impl Debug for MemoryAreaType
source§impl From<MemoryAreaType> for MemoryAreaTypeId
impl From<MemoryAreaType> for MemoryAreaTypeId
source§fn from(value: MemoryAreaType) -> Self
fn from(value: MemoryAreaType) -> Self
Converts to this type from the input type.
source§impl From<MemoryAreaTypeId> for MemoryAreaType
impl From<MemoryAreaTypeId> for MemoryAreaType
source§fn from(value: MemoryAreaTypeId) -> Self
fn from(value: MemoryAreaTypeId) -> Self
Converts to this type from the input type.
source§impl Hash for MemoryAreaType
impl Hash for MemoryAreaType
source§impl Ord for MemoryAreaType
impl Ord for MemoryAreaType
source§fn cmp(&self, other: &MemoryAreaType) -> Ordering
fn cmp(&self, other: &MemoryAreaType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<MemoryAreaType> for MemoryAreaType
impl PartialEq<MemoryAreaType> for MemoryAreaType
source§fn eq(&self, other: &MemoryAreaType) -> bool
fn eq(&self, other: &MemoryAreaType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<MemoryAreaType> for MemoryAreaTypeId
impl PartialEq<MemoryAreaType> for MemoryAreaTypeId
source§fn eq(&self, other: &MemoryAreaType) -> bool
fn eq(&self, other: &MemoryAreaType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<MemoryAreaTypeId> for MemoryAreaType
impl PartialEq<MemoryAreaTypeId> for MemoryAreaType
source§fn eq(&self, other: &MemoryAreaTypeId) -> bool
fn eq(&self, other: &MemoryAreaTypeId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<MemoryAreaType> for MemoryAreaType
impl PartialOrd<MemoryAreaType> for MemoryAreaType
source§fn partial_cmp(&self, other: &MemoryAreaType) -> Option<Ordering>
fn partial_cmp(&self, other: &MemoryAreaType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for MemoryAreaType
impl Eq for MemoryAreaType
impl StructuralEq for MemoryAreaType
impl StructuralPartialEq for MemoryAreaType
Auto Trait Implementations§
impl RefUnwindSafe for MemoryAreaType
impl Send for MemoryAreaType
impl Sync for MemoryAreaType
impl Unpin for MemoryAreaType
impl UnwindSafe for MemoryAreaType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> TagTrait for Twhere
T: Pointee<Metadata = ()>,
impl<T> TagTrait for Twhere T: Pointee<Metadata = ()>,
source§fn dst_size(_: &Tag) -> <T as Pointee>::Metadata
fn dst_size(_: &Tag) -> <T as Pointee>::Metadata
Returns the amount of items in the dynamically sized portion of the
DST. Note that this is not the amount of bytes. So if the dynamically
sized portion is 16 bytes in size and each element is 4 bytes big, then
this function must return 4.
source§unsafe fn from_base_tag<'a>(tag: &Tag) -> &'a Self
unsafe fn from_base_tag<'a>(tag: &Tag) -> &'a Self
Creates a reference to a (dynamically sized) tag type in a safe way.
DST tags need to implement a proper
Self::dst_size
implementation. Read more