pub struct Object { /* private fields */ }Expand description
A generic QEMU -object typename[,prop=value,...] definition.
Implementations§
Source§impl Object
impl Object
Sourcepub fn builder() -> ObjectBuilder
pub fn builder() -> ObjectBuilder
Create an instance of Object using the builder syntax
Source§impl Object
impl Object
pub fn new<S: AsRef<str>>(typename: S) -> 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 object from QEMU’s JSON command-line form.
pub fn add_prop<S: AsRef<str>>(&mut self, key: S, value: S) -> &mut Self
Sourcepub fn monitor_hmp(id: impl AsRef<str>, chardev: impl AsRef<str>) -> Self
pub fn monitor_hmp(id: impl AsRef<str>, chardev: impl AsRef<str>) -> Self
Creates a QEMU 11.1 HMP monitor object.
Sourcepub fn monitor_qmp(id: impl AsRef<str>, chardev: impl AsRef<str>) -> Self
pub fn monitor_qmp(id: impl AsRef<str>, chardev: impl AsRef<str>) -> Self
Creates a QEMU 11.1 QMP monitor object.
Sourcepub fn tdx_guest(id: impl AsRef<str>) -> Self
pub fn tdx_guest(id: impl AsRef<str>) -> Self
Creates an Intel TDX confidential-guest object. Nested socket addresses
can be supplied with Object::from_json.
Sourcepub fn iothread(id: impl AsRef<str>) -> Self
pub fn iothread(id: impl AsRef<str>) -> Self
Creates an IOThread object; QEMU 11.1’s poll-weight can be added with
Object::add_prop.
Trait Implementations§
Source§impl Arbitrary for Object
impl Arbitrary for Object
Source§type Parameters = (<String as Arbitrary>::Parameters, <Vec<(String, String)> as Arbitrary>::Parameters, <Option<String> as Arbitrary>::Parameters)
type Parameters = (<String as Arbitrary>::Parameters, <Vec<(String, String)> 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<(String, String)> as Arbitrary>::Strategy, <Option<String> as Arbitrary>::Strategy), fn((String, Vec<(String, String)>, Option<String>)) -> Object>
type Strategy = Map<(<String as Arbitrary>::Strategy, <Vec<(String, String)> as Arbitrary>::Strategy, <Option<String> as Arbitrary>::Strategy), fn((String, Vec<(String, String)>, Option<String>)) -> Object>
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 Object
Source§impl Ord for Object
impl Ord for Object
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 Object
impl PartialOrd for Object
impl StructuralPartialEq for Object
Source§impl ToCommand for Object
impl ToCommand for Object
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 Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnsafeUnpin for Object
impl UnwindSafe for Object
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