Enum mmap_fixed::MapOption
source · pub enum MapOption {
MapReadable,
MapWritable,
MapExecutable,
MapAddr(*const u8),
MapFd(HANDLE),
MapOffset(usize),
MapNonStandardFlags(i32),
}
Expand description
Options the memory map is created with
Variants§
MapReadable
The memory should be readable
MapWritable
The memory should be writable
MapExecutable
The memory should be executable
MapAddr(*const u8)
Create a map for a specific address range. Corresponds to MAP_FIXED
on
POSIX.
MapFd(HANDLE)
Create a memory mapping for a file with a given HANDLE.
MapOffset(usize)
When using MapFd
, the start of the map is usize
bytes from the start
of the file.
MapNonStandardFlags(i32)
On POSIX, this can be used to specify the default flags passed to
mmap
. By default it uses MAP_PRIVATE
and, if not using MapFd
,
MAP_ANON
. This will override both of those. This is platform-specific
(the exact values used) and ignored on Windows.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for MapOption
impl !Send for MapOption
impl !Sync for MapOption
impl Unpin for MapOption
impl UnwindSafe for MapOption
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