pub struct AudioDev { /* private fields */ }Expand description
A QEMU -audiodev [driver=]driver,id=id[,prop[=value][,...]] definition.
This type intentionally preserves arbitrary property keys instead of
validating backend-specific options, so it can round-trip the generic
-audiodev surface described by QEMU.
Implementations§
Source§impl AudioDev
impl AudioDev
Sourcepub fn builder() -> AudioDevBuilder
pub fn builder() -> AudioDevBuilder
Create an instance of AudioDev using the builder syntax
Source§impl AudioDev
impl AudioDev
pub fn new(driver: impl Into<String>) -> Self
Sourcepub fn from_json(json: impl Into<String>) -> Result<Self, String>
pub fn from_json(json: impl Into<String>) -> Result<Self, String>
Creates an audio backend from QEMU’s JSON command-line form.
pub fn add_prop( &mut self, key: impl Into<String>, value: impl Into<String>, ) -> &mut Self
pub fn add_flag(&mut self, key: impl Into<String>) -> &mut Self
Trait Implementations§
Source§impl Arbitrary for AudioDev
impl Arbitrary for AudioDev
Source§type Parameters = (<String as Arbitrary>::Parameters, <Vec<AudioDevProperty> as Arbitrary>::Parameters, <Option<String> as Arbitrary>::Parameters)
type Parameters = (<String as Arbitrary>::Parameters, <Vec<AudioDevProperty> 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<(<String as Arbitrary>::Strategy, <Vec<AudioDevProperty> as Arbitrary>::Strategy, <Option<String> as Arbitrary>::Strategy), fn((String, Vec<AudioDevProperty>, Option<String>)) -> AudioDev>
type Strategy = Map<(<String as Arbitrary>::Strategy, <Vec<AudioDevProperty> as Arbitrary>::Strategy, <Option<String> as Arbitrary>::Strategy), fn((String, Vec<AudioDevProperty>, Option<String>)) -> AudioDev>
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 AudioDev
Source§impl Ord for AudioDev
impl Ord for AudioDev
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 AudioDev
impl PartialOrd for AudioDev
impl StructuralPartialEq for AudioDev
Source§impl ToCommand for AudioDev
impl ToCommand for AudioDev
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 AudioDev
impl RefUnwindSafe for AudioDev
impl Send for AudioDev
impl Sync for AudioDev
impl Unpin for AudioDev
impl UnsafeUnpin for AudioDev
impl UnwindSafe for AudioDev
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