Struct virtio_block_test_util::Config
source · pub(crate) struct Config {
pub(crate) block_size: u32,
pub(crate) pci_bus: u8,
pub(crate) pci_device: u8,
pub(crate) cmd: Command,
}
Fields§
§block_size: u32
§pci_bus: u8
§pci_device: u8
§cmd: Command
Trait Implementations§
source§impl StructOpt for Config
impl StructOpt for Config
source§fn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
Creates the struct from
clap::ArgMatches
. It cannot fail
with a parameter generated by clap
by construction.§fn from_args() -> Selfwhere
Self: Sized,
fn from_args() -> Selfwhere Self: Sized,
Gets the struct from the command line arguments. Print the
error message and quit the program in case of failure.
§fn from_iter<I>(iter: I) -> Selfwhere
Self: Sized,
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString> + Clone,
fn from_iter<I>(iter: I) -> Selfwhere Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,
Gets the struct from any iterator such as a
Vec
of your making.
Print the error message and quit the program in case of failure.§fn from_iter_safe<I>(iter: I) -> Result<Self, Error>where
Self: Sized,
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString> + Clone,
fn from_iter_safe<I>(iter: I) -> Result<Self, Error>where Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,
Gets the struct from any iterator such as a
Vec
of your making. Read more