pub struct DiskOption {
pub path: PathBuf,
pub read_only: bool,
pub root: bool,
pub sparse: bool,
pub direct: bool,
pub block_size: u32,
pub id: Option<[u8; 20]>,
pub multiple_workers: bool,
pub async_executor: Option<ExecutorKind>,
}
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
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.
Implementations
Trait Implementations
sourceimpl Clone for DiskOption
impl Clone for DiskOption
sourcefn clone(&self) -> DiskOption
fn clone(&self) -> DiskOption
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for DiskOption
impl Debug for DiskOption
sourceimpl<'de> Deserialize<'de> for DiskOption
impl<'de> Deserialize<'de> for DiskOption
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl FromArgValue for DiskOption
impl FromArgValue for DiskOption
sourceimpl PartialEq<DiskOption> for DiskOption
impl PartialEq<DiskOption> for DiskOption
sourcefn eq(&self, other: &DiskOption) -> bool
fn eq(&self, other: &DiskOption) -> bool
sourceimpl Serialize for DiskOption
impl Serialize for DiskOption
impl Eq for DiskOption
impl StructuralEq 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read morefn 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. Read morefn 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. Read more