Struct memmap2::RemapOptions
source · pub struct RemapOptions { /* private fields */ }
Expand description
Options for Mmap::remap
and MmapMut::remap
.
Implementations§
source§impl RemapOptions
impl RemapOptions
sourcepub fn may_move(self, may_move: bool) -> Self
pub fn may_move(self, may_move: bool) -> Self
Controls whether the memory map can be moved if it is not possible to resize it in place.
If false then the memory map is guaranteed to remain at the same address when being resized but attempting to resize will return an error if the new memory map would overlap with something else in the current process’ memory.
By default this is false.
may_move
and StableDeref
If the stable_deref_trait
feature is enabled then Mmap
and
MmapMut
implement StableDeref
. StableDeref
promises that the
memory map dereferences to a fixed address, however, calling remap
with may_move
set may result in the backing memory of the mapping
being moved to a new address. This may cause UB in other code
depending on the StableDeref
guarantees.
Trait Implementations§
source§impl Clone for RemapOptions
impl Clone for RemapOptions
source§fn clone(&self) -> RemapOptions
fn clone(&self) -> RemapOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RemapOptions
impl Debug for RemapOptions
source§impl Default for RemapOptions
impl Default for RemapOptions
source§fn default() -> RemapOptions
fn default() -> RemapOptions
Returns the “default value” for a type. Read more
impl Copy for RemapOptions
Auto Trait Implementations§
impl RefUnwindSafe for RemapOptions
impl Send for RemapOptions
impl Sync for RemapOptions
impl Unpin for RemapOptions
impl UnwindSafe for RemapOptions
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