pub struct MmapRange { /* private fields */ }
Available on crate feature
backend-mmap
and crate feature xen
and Unix only.Expand description
MmapRange
represents a range of arguments required to create Mmap regions.
Implementations§
Source§impl MmapRange
impl MmapRange
Sourcepub fn new(
size: usize,
file_offset: Option<FileOffset>,
addr: GuestAddress,
mmap_flags: u32,
mmap_data: u32,
) -> Self
pub fn new( size: usize, file_offset: Option<FileOffset>, addr: GuestAddress, mmap_flags: u32, mmap_data: u32, ) -> Self
Creates instance of the range with multiple arguments.
Sourcepub fn new_unix(
size: usize,
file_offset: Option<FileOffset>,
addr: GuestAddress,
) -> Self
pub fn new_unix( size: usize, file_offset: Option<FileOffset>, addr: GuestAddress, ) -> Self
Creates instance of the range for MmapXenFlags::UNIX
type mapping.
Sourcepub fn set_hugetlbfs(&mut self, hugetlbfs: bool)
pub fn set_hugetlbfs(&mut self, hugetlbfs: bool)
Set the hugetlbfs of the range.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MmapRange
impl RefUnwindSafe for MmapRange
impl Send for MmapRange
impl Sync for MmapRange
impl Unpin for MmapRange
impl UnwindSafe for MmapRange
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