#[repr(C, packed(1))]pub struct MemoryEntry { /* private fields */ }
Expand description
Multiboot format of the MMAP buffer.
Note that size is defined to be at -4 bytes in multiboot.
Implementations§
Source§impl MemoryEntry
impl MemoryEntry
Sourcepub fn new(base_addr: PAddr, length: PAddr, ty: MemoryType) -> Self
pub fn new(base_addr: PAddr, length: PAddr, ty: MemoryType) -> Self
Create a new entry from the given data.
Note that this will always create a struct that has a size of 20 bytes.
Sourcepub fn base_address(&self) -> PAddr
pub fn base_address(&self) -> PAddr
Get base of memory region.
Sourcepub fn memory_type(&self) -> MemoryType
pub fn memory_type(&self) -> MemoryType
Is the region type valid RAM?
Trait Implementations§
Source§impl Clone for MemoryEntry
impl Clone for MemoryEntry
Source§fn clone(&self) -> MemoryEntry
fn clone(&self) -> MemoryEntry
Returns a duplicate 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 MemoryEntry
impl Debug for MemoryEntry
Source§impl Default for MemoryEntry
impl Default for MemoryEntry
impl Copy for MemoryEntry
Auto Trait Implementations§
impl Freeze for MemoryEntry
impl RefUnwindSafe for MemoryEntry
impl Send for MemoryEntry
impl Sync for MemoryEntry
impl Unpin for MemoryEntry
impl UnwindSafe for MemoryEntry
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