Enum vm_control::sys::linux::VmMemoryMappingRequest
source · pub enum VmMemoryMappingRequest {
MsyncArena {
slot: MemSlot,
offset: usize,
size: usize,
},
MadvisePageout {
slot: MemSlot,
offset: usize,
size: usize,
},
MadviseRemove {
slot: MemSlot,
offset: usize,
size: usize,
},
}
Variants§
MsyncArena
Flush the content of a memory mapping to its backing file.
slot
selects the arena (as returned by Vm::add_mmap_arena
).
offset
is the offset of the mapping to sync within the arena.
size
is the size of the mapping to sync within the arena.
MadvisePageout
Gives a MADV_PAGEOUT advice to the memory region mapped at slot
, with the address range
starting at offset
from the start of the region, and with size size
.
MadviseRemove
Gives a MADV_REMOVE advice to the memory region mapped at slot
, with the address range
starting at offset
from the start of the region, and with size size
.
Implementations§
source§impl VmMemoryMappingRequest
impl VmMemoryMappingRequest
sourcepub fn execute(&self, vm: &mut impl Vm) -> VmMemoryMappingResponse
pub fn execute(&self, vm: &mut impl Vm) -> VmMemoryMappingResponse
Executes this request on the given Vm.
§Arguments
vm
- TheVm
to perform the request on.
This does not return a result, instead encapsulating the success or failure in a
VmMsyncResponse
with the intended purpose of sending the response back over the socket
that received this VmMsyncResponse
.
Trait Implementations§
source§impl Debug for VmMemoryMappingRequest
impl Debug for VmMemoryMappingRequest
source§impl<'de> Deserialize<'de> for VmMemoryMappingRequest
impl<'de> Deserialize<'de> for VmMemoryMappingRequest
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl RefUnwindSafe for VmMemoryMappingRequest
impl Send for VmMemoryMappingRequest
impl Sync for VmMemoryMappingRequest
impl Unpin for VmMemoryMappingRequest
impl UnwindSafe for VmMemoryMappingRequest
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.