pub struct Device { /* private fields */ }Expand description
Add a QEMU device driver with optional prop or prop=value settings.
Valid properties depend on the device driver. Use -device help or
-device driver,help in QEMU for the device-specific property list.
Implementations§
Source§impl Device
impl Device
Sourcepub fn builder() -> DeviceBuilder
pub fn builder() -> DeviceBuilder
Create an instance of Device using the builder syntax
Source§impl Device
impl Device
Sourcepub fn new<S: AsRef<str>>(device: S) -> Self
pub fn new<S: AsRef<str>>(device: S) -> Self
Creates a new device argument for the given QEMU device driver.
Sourcepub fn arm_smmuv3() -> Self
pub fn arm_smmuv3() -> Self
Creates the QEMU 11.1 ARM SMMUv3 device. Properties such as ril,
ats, oas, ssidsize, and cmdqv accept QEMU’s auto value via
Device::add_prop.
Sourcepub fn from_json(json: impl Into<String>) -> Result<Self, String>
pub fn from_json(json: impl Into<String>) -> Result<Self, String>
Creates a device from QEMU’s JSON command-line form.
Trait Implementations§
Source§impl Arbitrary for Device
impl Arbitrary for Device
Source§type Parameters = (<ShellString as Arbitrary>::Parameters, <BTreeMap<ShellString, Option<ShellString>> as Arbitrary>::Parameters, <Option<String> as Arbitrary>::Parameters)
type Parameters = (<ShellString as Arbitrary>::Parameters, <BTreeMap<ShellString, Option<ShellString>> as Arbitrary>::Parameters, <Option<String> as Arbitrary>::Parameters)
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = Map<(<ShellString as Arbitrary>::Strategy, <BTreeMap<ShellString, Option<ShellString>> as Arbitrary>::Strategy, <Option<String> as Arbitrary>::Strategy), fn((ShellString, BTreeMap<ShellString, Option<ShellString>>, Option<String>)) -> Device>
type Strategy = Map<(<ShellString as Arbitrary>::Strategy, <BTreeMap<ShellString, Option<ShellString>> as Arbitrary>::Strategy, <Option<String> as Arbitrary>::Strategy), fn((ShellString, BTreeMap<ShellString, Option<ShellString>>, Option<String>)) -> Device>
The type of
Strategy used to generate values of type Self.Source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
impl Eq for Device
Source§impl Ord for Device
impl Ord for Device
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Device
impl PartialOrd for Device
impl StructuralPartialEq for Device
Source§impl ToCommand for Device
impl ToCommand for Device
Source§fn command(&self) -> String
fn command(&self) -> String
Convert to a type suitable to pass to
std::process::Command::new()Source§fn to_args(&self) -> Vec<String>
fn to_args(&self) -> Vec<String>
Convert to a type suitable to pass to
std::process::Command::args()fn has_args(&self) -> bool
Source§fn to_command(&self) -> Vec<String>
fn to_command(&self) -> Vec<String>
Construct the full command in keep in pieces
Source§fn to_single_command(&self) -> String
fn to_single_command(&self) -> String
Construct the full command as a single
StringSource§fn to_single_arg(&self) -> String
fn to_single_arg(&self) -> String
Construct only the args as a single
StringAuto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
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