pub struct VmRegion { /* private fields */ }Implementations§
Source§impl VmRegion
impl VmRegion
pub fn new( start: VirtAddr, len: usize, kind: VmRegionKind, permissions: VmPermissions, ) -> Result<Self, &'static str>
pub const fn start(&self) -> VirtAddr
pub const fn end(&self) -> VirtAddr
pub const fn kind(&self) -> VmRegionKind
pub const fn permissions(&self) -> VmPermissions
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn page_count(&self) -> usize
pub fn contains(&self, addr: VirtAddr) -> bool
pub fn overlaps(&self, other: &VmRegion) -> bool
pub fn committed_page_count(&self) -> usize
pub fn is_page_committed(&self, addr: VirtAddr) -> bool
pub fn commit_page(&mut self, addr: VirtAddr) -> Result<bool, &'static str>
pub fn grow_down_to( &mut self, fault_addr: VirtAddr, ) -> Result<bool, &'static str>
Trait Implementations§
impl Copy for VmRegion
impl Eq for VmRegion
impl StructuralPartialEq for VmRegion
Auto Trait Implementations§
impl Freeze for VmRegion
impl RefUnwindSafe for VmRegion
impl Send for VmRegion
impl Sync for VmRegion
impl Unpin for VmRegion
impl UnsafeUnpin for VmRegion
impl UnwindSafe for VmRegion
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