Enum mmap_fixed_fixed::MapOption
source · [−]pub enum MapOption {
MapReadable,
MapWritable,
MapExecutable,
MapAddr(*const u8),
MapFd(c_int),
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(c_int)
Create a memory mapping for a file with a given fd.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more