pub struct Region {
start: Option<VirtAddr>,
len: usize,
backing: Backing,
perms: Perms,
}Fields§
§start: Option<VirtAddr>§len: usize§backing: Backing§perms: PermsImplementations§
Source§impl Region
impl Region
Sourcepub fn new(
start: Option<VirtAddr>,
len: usize,
backing: Backing,
perms: Perms,
) -> Self
pub fn new( start: Option<VirtAddr>, len: usize, backing: Backing, perms: Perms, ) -> Self
Creates a new region.
startis the starting virtual address of the region. IfNone, the system will choose a suitable address.lenis the length of the region in bytes.backingis the backing type of the region, which determines how the region is initialized and where its contents come from.permsis the permissions of the region, which determines how the region can be accessed.
pub fn start(&self) -> VirtAddr
pub fn len(&self) -> usize
pub fn contains(&self, addr: VirtAddr) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Region
impl RefUnwindSafe for Region
impl Send for Region
impl Sync for Region
impl Unpin for Region
impl UnwindSafe for Region
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