Struct devices::virtio::PmemConfig
source · pub struct PmemConfig {
pub disk_image: Option<File>,
pub mapping_address: GuestAddress,
pub mem_slot: MemSlotConfig,
pub mapping_size: u64,
pub pmem_device_tube: Tube,
pub swap_interval: Option<Duration>,
pub mapping_writable: bool,
}
Expand description
Configuration of a virtio-pmem device.
Fields§
§disk_image: Option<File>
Disk image exposed to the guest.
If the memory region is not backed by a file, this should be None
.
mapping_address: GuestAddress
Guest physical address where the memory will be mapped.
mem_slot: MemSlotConfig
§mapping_size: u64
The size of the mapped region.
pmem_device_tube: Tube
A communication channel to the main process to send memory requests.
swap_interval: Option<Duration>
Interval for periodic swap out of memory mapping
mapping_writable: bool
Whether the region is writeble or not.
Auto Trait Implementations§
impl RefUnwindSafe for PmemConfig
impl Send for PmemConfig
impl Sync for PmemConfig
impl Unpin for PmemConfig
impl UnwindSafe for PmemConfig
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
§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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.