pub struct MemoryRegion(/* private fields */);Expand description
A range of virtual addresses which may be mapped in a page table.
Implementations§
Source§impl MemoryRegion
impl MemoryRegion
Sourcepub const fn new(start: usize, end: usize) -> MemoryRegion
pub const fn new(start: usize, end: usize) -> MemoryRegion
Constructs a new MemoryRegion for the given range of virtual addresses.
The start is inclusive and the end is exclusive. Both will be aligned to the PAGE_SIZE,
with the start being rounded down and the end being rounded up.
Sourcepub const fn start(&self) -> VirtualAddress
pub const fn start(&self) -> VirtualAddress
Returns the first virtual address of the memory range.
Sourcepub const fn end(&self) -> VirtualAddress
pub const fn end(&self) -> VirtualAddress
Returns the first virtual address after the memory range.
Trait Implementations§
Source§impl Clone for MemoryRegion
impl Clone for MemoryRegion
Source§fn clone(&self) -> MemoryRegion
fn clone(&self) -> MemoryRegion
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 MemoryRegion
impl Debug for MemoryRegion
Source§impl Display for MemoryRegion
impl Display for MemoryRegion
Source§impl From<Range<VirtualAddress>> for MemoryRegion
impl From<Range<VirtualAddress>> for MemoryRegion
Source§fn from(range: Range<VirtualAddress>) -> Self
fn from(range: Range<VirtualAddress>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MemoryRegion
impl PartialEq for MemoryRegion
impl Eq for MemoryRegion
impl StructuralPartialEq for MemoryRegion
Auto Trait Implementations§
impl Freeze for MemoryRegion
impl RefUnwindSafe for MemoryRegion
impl Send for MemoryRegion
impl Sync for MemoryRegion
impl Unpin for MemoryRegion
impl UnwindSafe for MemoryRegion
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