Struct devices::virtio::block::DiskOption
source · pub struct DiskOption {Show 13 fields
pub path: PathBuf,
pub read_only: bool,
pub root: bool,
pub sparse: bool,
pub direct: bool,
pub lock: bool,
pub block_size: u32,
pub id: Option<[u8; 20]>,
pub multiple_workers: bool,
pub async_executor: Option<ExecutorKind>,
pub packed_queue: bool,
pub bootindex: Option<usize>,
pub pci_address: Option<PciAddress>,
}
Fields§
§path: PathBuf
§read_only: bool
§root: bool
Whether this disk should be the root device. Can only be set once. Only useful for adding specific command-line options.
sparse: bool
§direct: bool
§lock: bool
Whether to lock the disk files. Uses flock on Unix and FILE_SHARE_* flags on Windows.
block_size: u32
§id: Option<[u8; 20]>
§multiple_workers: bool
Experimental option to run multiple worker threads in parallel. If false, only single thread runs by default. Note this option is not effective for vhost-user blk device.
async_executor: Option<ExecutorKind>
The async executor kind to simulate the block device with. This option takes precedence over the async executor kind specified by the subcommand’s option. If None, the default or the specified by the subcommand’s option would be used.
packed_queue: bool
§bootindex: Option<usize>
Specify the boot index for this device that the BIOS will use when attempting to boot from bootable devices. For example, if bootindex=2, then the BIOS will attempt to boot from the device right after booting from the device with bootindex=1 fails.
pci_address: Option<PciAddress>
Specify PCI address will be used to attach this device
Implementations§
Trait Implementations§
source§impl Clone for DiskOption
impl Clone for DiskOption
source§fn clone(&self) -> DiskOption
fn clone(&self) -> DiskOption
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DiskOption
impl Debug for DiskOption
source§impl Default for DiskOption
impl Default for DiskOption
source§impl<'de> Deserialize<'de> for DiskOption
impl<'de> Deserialize<'de> for DiskOption
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>,
source§impl FromArgValue for DiskOption
impl FromArgValue for DiskOption
source§impl PartialEq for DiskOption
impl PartialEq for DiskOption
source§fn eq(&self, other: &DiskOption) -> bool
fn eq(&self, other: &DiskOption) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for DiskOption
impl Serialize for DiskOption
impl Eq for DiskOption
impl StructuralPartialEq for DiskOption
Auto Trait Implementations§
impl RefUnwindSafe for DiskOption
impl Send for DiskOption
impl Sync for DiskOption
impl Unpin for DiskOption
impl UnwindSafe for DiskOption
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.